Create token using API with custom claim

can we create a token using API with a custom token?

Hi there @akgupta317 welcome to the community!

Are you able to expand on your specific desired use case here so that we might be able to understand your question a bit better?


yes, @tyf
we want to create an access_token for a user with a custom claim via Management API.

1 Like

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:

Hope this helps!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.