Contentstack provides management token for read-write access to the content of your stack.
To create a management token, log in to your Contentstack account, and perform the following steps:
- Go to your stack, navigate to the “Settings” gear icon, and select Tokens.
- Open the Management Tokens tab, and click on either + ADD TOKEN or the add one link (if you haven’t created any tokens yet).
- Provide a relevant Name and Description for the token.
- Under Permissions, select the stack-level permissions you want to assign to this token, such as Read or Write.
- Under Expiry, set an expiration limit for this management token:
- Never: Select this option if you do not want the token to have an expiration date.
- Date (in UTC): Select this option if you want the token to expire at a particular date.
Check the Notify via email option that appears for this option, if you want to get notified via email 7 days before the token expires.
Note: Once you set the expiration limit, the management token expires at midnight (UTC time) of the specified date.
Once a management token has expired, it becomes invalid and it cannot be used to make any Content Management API calls.
- Click on Generate Token.
- The Management Token Generated window appears where you can see the Stack API Key and the generated Management Token.
Warning: Make sure to note down the management token for future reference, because once you close the window, you will not be able to view it again.
- Finally, click on Done.
Now, you can use the generated token to make authorized Content Management API requests at the stack level.
Note: At a time, you can generate a maximum of 10 valid management tokens for a specific stack within your organization. Now, if you already have 10 valid tokens, creating a new management token will automatically cause the oldest management token to expire without warning.
Let's see how to create a management token.