cancel
Showing results for 
Search instead for 
Did you mean: 
Effective January 9th, 2026 through January 22nd, 2026: The Zoom Community is currently in read-only mode with login disabled, to deliver you a new and improved community experience!

The site is still accessible to view, however, the ability to login, create content, or access your community account is temporarily unavailable. We appreciate your patience during this time. If seeking support, please browse existing community content or ask our Zoom Virtual Agent.

get access token in my app "error": "400 Client Error: Bad Request for url: https://zoom.us/oauth/to

aneesraza
Newcomer
Newcomer
@api.get("/oauth/callback", tags=['Integrations'])
async def callback(request: Request):
    authorization_code = request.query_params.get('code')
    token_url = 'https://zoom.us/oauth/token'

    payload = {
        'grant_type': 'authorization_code',
        'code': authorization_code,
        'client_id': CLIENT_ID,
        'client_secret': CLIENT_SECRET,
        'redirect_uri': REDIRECT_URI
    }

    try:
        response = requests.post(token_url, data=payload)
        response.raise_for_status()
        access_token = response.json().get('access_token')
        print ("Access token: ", access_token)
        if access_token:
            # Save the access token in your database or perform any other required actions
            return {'access_token': access_token}
        else:
            return {'error': 'Access token not found'}
    except requests.exceptions.HTTPError as e:
        return {'error': str(e)}
1 REPLY 1

Ray_Harwood
Community Champion | Customer
Community Champion | Customer

Welcome to the Zoom Community, @aneesraza 

 

This is a question more appropriate for the Developers Forum at https://developers.zoom.us/


Ray -- check out the GoodClix website.