Skip to main content
Question

Unable to get access_token

  • 2 July 2024
  • 1 reply
  • 20 views

In the developer platform, when I test my authentication
I am unable to get the access token with this redirect URL.
 

https://zapier.com/dashboard/auth/oauth/return/App20X484CXXXXX/?state=1719895203.566112315995&code=668384a2d572f5.05475924 

 

Get this error:
“Field named `access_token` not found in OAuth2 results”.
screenshothttps://prnt.sc/M-oDXD9mRyNN

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 4
Badge +9

Hey @Utsav 👋

It sounds like the API you’re working with might be returning the access token under a different field key than the `access_token` you configured.

To start with, compare the results you’re receiving back from the API in the Monitoring tab: https://platform.zapier.com/build/test-monitoring#monitoring to the field keys you’re using, is the access token returned under a different key?

Then check the `Show Options` for your Oauth requests, do they include the correct keys within the correct bundle?

https://platform.zapier.com/build/oauth#add-oauth-endpoint-configuration
https://platform.zapier.com/build/bundle

For example, the Access Token value will often be accessed via {{bundle.authData.access_token}} or {{bundle.authData.accessToken}}.

However, the authData bundle does not support nested objects: all values returned from authentication functions need to be at the top level.

If you’re still stuck, please write into https://developer.zapier.com/contact and make sure to include a link to the API documentation you’re working from, that includes the expected authentication setup.