I am developing a webapp that will take the user’s observations, assign stats to them, and they can use them for battle etc. Kinda like pokemonGO.
I got the initial login to work but the next step, doing the fetch(‘https://www.inaturalist.org/oauth/token’, doesnt seem to work for me…
I used:
const res = await fetch(‘https://www.inaturalist.org/oauth/token’, {
method: ‘POST’,
headers: {
“Content-Type”: “application/json”
},
body: JSON.stringify({
client_id,
client_secret,
code
})
})
and then I try to log the token but it just says token: NULL. What am I doing wrong?
I just need the user to log in so that the webapp can pull the users observations and such, as well as know that it is actually that person that is using the account. I belive that I can pull users observations without login but in my case I need to make sure that person is who they really are.
basically, I just need the user to log in so that the webapp can pull users observations so that I can assign stats to use for battle, sort of like PokemonGo. Right now I am just trying to get the login part to work so that I can pull userdata based on the username or ID or something that I can hopefully get from the login
I believe its all client side, ill have to check again.
as for the code snippet, I was just making a testfile in js that could let me login to get userdata. the testfile was streight js.