Create token using API with custom claim

Gotcha, thanks for clarifying!

The most straightforward way to get an access token for a user is to use the resource owner password flow against the /oauth/token endpoint of the Authentication API:

You’ll need to make sure whatever client_id you are setting has the password grant enabled in the application settings in your dashboard (settings → advanced settings → grant types).

You can add custom claims to the token with an Action which will execute when the user logs in:

https://community.auth0.com/t/adding-custom-claims-to-tokens/84590

Hope this helps!