How to add custom claims to the Auth0 Token

How to add these custom claims to the token

“email”: “”,
“email_verified”: true,
“user_id”: “custom|123”,
“favorite_color”: “blue”,

to this token using curl or Node JS

curl --request POST
–header ‘content-type: application/json’
–data ‘{“client_id”:“test”,“client_secret”:“test”,“audience”:“",“grant_type”:"client_credentials”}’

or Node Js
var request = require(“request”);

var options = { method: ‘POST’,
url: ‘’,
headers: { ‘content-type’: ‘application/json’ },
body: ‘{“client_id”:“test”,“client_secret”:“test”,“audience”:“",“grant_type”:"client_credentials”}’ };

request(options, function (error, response, body) {
if (error) throw new Error(error);


Hello, @sriharish_sathyanara,

Custom claims need to be added to the token before they are issued. They can not be added after the token has been issued, as it would invalidate the token’s signature.

You can do this by leveraging a Rule or a Hook, depending on the type of grant that you are executing.

1 Like