API Tokens
API access tokens are the credentials you need to access the Astrocast API.
An access token is used in two scenarios:
- You want to access your account, manage your data, retrieve your messages, and send commands programmatically using the Astrocast API ;
- You want to send messages with your Astrocast Wi-Fi DevKit board over a Wi-Fi network, which also requires an access token to connect to the Astrocast API.
tip
For security reasons, we recommend that you to create a separate API access token for each application. If one of your tokens is compromised, you can then revoke that specific access token.
Create an access token
To create a new access token:
- Go to the Astrocast Portal.
- In the bottom left corner, click on
⚙️ Settings. - Click on
Access Tokens. - Click on
➕ create new access token. - Enter a
namefor your access token, set anExpiration dateand assign aRole. - Click on
Create. 🗒️Copy the access token and store it in a safe place.
caution
You are responsible for storing your access token in a secure location and handling it as a secret. Astrocast cannot retrieve an access token if you lose one.
Edit an access token
To edit the parameters of an access token:
- Go to the Astrocast Portal.
- In the bottom left corner, click on
⚙️ Settings. - Click on
Access Tokens. - Click on
🖊️to edit an access token. - Update the access token
Name,Expiration dateand/orRole. - Click on
Update.
Delete an access token
When you want to delete an access token:
- Go to the Astrocast Portal.
- In the bottom left corner, click on
⚙️ Settings. - Click on
Access Tokens. - Click on
🗑️to delete an access token. - Confirm.
Access token roles
You can grant one of the following roles to your access token.
| Role Name | Description |
|---|---|
| Owner | Grants full access to manage all resources, including the ability to assign roles. |
| Contributor | Grants full access to manage all resources, but does not allow you to assign roles. |
| Reader | View all resources, but does not allow you to make any changes. |
| Wi-Fi DevKit | Allows to send messages and retrieve unicast commands. |