Error: invalid_grant when requesting OAuth token
Good morning zoomerinos! I am setting up a marketplace app with Zoom OAuth. I am able to redirect to the Zoom Authorization page just fine, and I return to my dev app just fine with an authorization `code` in the query params. I did try: ✅ Manually encoding my client id/secret into base64 and checking the Authorization header matches ✅ Trying both the production client id/secret and the development ones ✅ Tried both JSON encoding and form encoding the body (currently is generated using URLSearchParams which should trigger fetch to use form encoding. ✅ Double checking all my redirect URIs are set properly in the App Marketplace ✅ Reading carefully through the portion of the docs about requesting the access token But I can't quite find any advice on what might be going wrong. Anyone have any ideas? Thanks!!
Hit a bit of a roadblock, and there is some discussion of this error on Google, but none of the advice worked for me. And other folks getting the issue seem to be using grant_type=refresh_token whereas I'm using grant_type=authorization_code. So I thought I'd thought I would ask for help here...
However, when I try to the POST to https://zoom.us/oauth/token, I get a 400 HTTP response with:{"reason":"Invalid authorization code","error":"invalid_grant"}
Here's the CURL of the request that's failing:curl \
-H 'Authorization: Basic aWxRc3VXaThUank3S3hmakdzZURpZzpyNmc5ZjRKdmw3YndOM0c3SXc3TUdiQm1pRHloZng5ZA==' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'code=DjVBukFT1o1SZSYLINJRBavYXnnWiZESQ&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fkernel-hvprcz4n3-kernel-fyi.vercel.app%2Fapi%2Fzoom%2Foauth%2Fsave' \
'https://zoom.us/oauth/token'
✅ Getting a fresh authorization code
Show less