Getting an Auth0 Access Token in a Custom GPT

Problem statement

This article explains how to set up authentication in a GPT created in ChatGPT:

The basic OAuth configuration has been configured to point to the Auth0 tenant, but an opaque Access Token is sent to the API.


OpenAI doesn’t provide a way to send custom parameters like ‘audience’ in login requests, so it will always receive an opaque Access Token.


One workaround here is to set up Default Audience in tenant settings. This way, ChatGPT will always receive a JWT access token meant for that audience. It will then be sent as a Bearer token in the Authorization header when the API is being called.

1 Like