Oauth flow gives Invalid authorization code error [resolved]

When trying to use the oauth flow, I keep getting an Invalid authorization code error when trying to do the code -> token exchange

response from zoom api:

{"reason":"Invalid authorization code [code from the oauth step]","error":"invalid_request"}

request sent:

  {"client_id"=>"[confirmed correct, also tried without this field]",
   "client_secret"=>"[confirmed correct, also tried without this field]",
    "https://[ngrok id].ngrok.io/api/v2/auth/zoom/callback",
   :code=>"[confirmed correct]"},
    "Basic RHFTTmN[..snip..]ZHgzb3NpeXYwUA=="}}

Which App Type (OAuth / Chatbot / JWT / Webhook)?
Using the OAuth endpoint - we need to auth 3rd parties

Additional context
I see mention of “development credentials” in other threads, but I only see production credentials in the oauth app. Do I need different credentials for testing?

I found that sending the code as a POST body seemed to be causing the error - changing to URL query params solved the issue for me

1 Like

Hey @kieran.huggins,

Happy to hear you figured out the issue! :slight_smile: