Question

Issues with OAuth2 flow

  • 29 April 2021
  • 2 replies
  • 330 views

Hi there, 

I’ve got some API documentation that I’m working with to get some OAuth2 set up. 

I’ve successfully got the application to go to the Authorize endpoint, where I can choose the scopes etc, but when I click confirm on the brand’s page, and I guess it’s making a POST to the Access Token endpoint I’m getting the result “Field named access_token not found in OAuth2 results”.

Authorize: https://ads.XXXXXX.com/marketing_api/auth?app_id=XXX&state=xxx&scope=xxx&redirect_uri=xxx.

Access Token: https://ads.XXXXXX.com/open_api/v1.2/oauth2/access_token

Taking the auth_code from the URL when Zapier tells me the “Field named access_token not found in OAuth2 results”, I can curl the Access Token endpoint and get a valid token.

I’m assuming that I’ve got something incorrectly configured, and I wonder if it’s down to the way that the brand is returning the authorization code?

 

Any help welcome! 

Thank you in advance. 


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

2 replies

Probably worth mentioning the URL that is provided after Authorize looks like this: 

https://zapier.com/dashboard/auth/oauth/return/AppXXXXXX/?state=XXXXXX&code=XXXXXX&auth_code=XXXXXX

Userlevel 7
Badge +10

@Issues with OAuth2