# OAuth 2.0 Authentication Problem Requesting Token from iNaturalist.org API

**URL:** <https://community.parabola.io/t/oauth-2-0-authentication-problem-requesting-token-from-inaturalist-org-api/1893>\
**Category:** Ask a question\
**Created:** [June 27, 2021, 5:57am UTC](https://community.parabola.io/t/oauth-2-0-authentication-problem-requesting-token-from-inaturalist-org-api/1893 "2021-06-27T05:57:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brother\_Toadstool](https://avatars.discourse-cdn.com/v4/letter/b/bcef8e/32.png) [@Brother\_Toadstool](https://community.parabola.io/u/Brother_Toadstool)\
**Post date:** [June 27, 2021, 5:57am UTC](https://community.parabola.io/t/oauth-2-0-authentication-problem-requesting-token-from-inaturalist-org-api/1893/1 "2021-06-27T05:57:11Z")

</div>

I am trying to access [iNaturalist.org](http://iNaturalist.org), which requires OAuth 2.0 authentication. It supports the Authorization Code flow, which I know Parabola also supports. I’ve created an app on iNaturalist and obtained the authorization request URL. When I try to perfrom an OAuth 2.0 authorization in Parabola, I keep getting an error after the initial authorization code is generated and the token request is placed. I get this error: “An error occurred during authorization: Access token URL returned a 500 when making a request for the access token.”

Here are the settings I have currently for the token request:

Token Request URL: [https://www.inaturalist.org/oauth/token](https://www.inaturalist.org/oauth/token)  
grant\_type: authorization\_code  
redirect\_uri: [https://parabola.io/api/steps/generic\_api/callback](https://parabola.io/api/steps/generic_api/callback)  
Header Key: Content-Type: application/json

Can someone help me understand what I’m doing wrong here? It seems to send the authorization request and generate the authorization code, because I can see the code appended to the redirect uri, but it seems to be broken at the point where the token is requested. Maybe I just have the URL wrong? I feel like it’s something simple that I’m overlooking.

Here are the [iNaturalist.org](http://iNaturalist.org) API docs: [https://www.inaturalist.org/pages/api+reference](https://www.inaturalist.org/pages/api+reference)

If anyone can help me solve this puzzle, I would immensely appreciate it! Thanks for taking the time. Hope everyone is well out there.

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/daniel/32/732_2.png) [@daniel](https://community.parabola.io/u/daniel)\
**Post date:** [June 28, 2021, 9:26pm UTC](https://community.parabola.io/t/oauth-2-0-authentication-problem-requesting-token-from-inaturalist-org-api/1893/2 "2021-06-28T21:26:07Z")

</div>

Hey @Brother_Toadstool 👋

Taking a look at their documentation, there are a few things to double-check to get this to work.

To start, can you double-check your Parabola account and clear your failed authorization attempts? You can do this by clicking into the “Pull from an API” step → Choose accounts → Edit → “Trash” icon.

Next, can you try sending a `client_secret` as a URL parameter for your token request URL?

 ![Screen Shot 2021-06-28 at 2.20.26 PM](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/f/f728d1011bda661164050327df1b01dfeaa87617.png)

Lastly, let’s ensure that your authorization code request is directed to `/oauth/authorize` and your token request is directed to `/oauth/token`. These are steps 1 and 2 of the authorization step configuration settings in Parabola.

Let me know if that helps!
