Skip to navigation
IntegrationsApplication tokens

Application tokens

Application tokens let your software access the emnify REST API without personal sign-in credentials. To manage them, go to Integrations and then Application tokens.

A workspace can hold up to 300 application tokens. The counter next to Add token shows how many your workspace has. When you reach the limit, Add token is turned off until you delete a token you no longer use.

Only users with the Admin role see Add token and the edit and delete buttons.

Add a token

1

Go to Application tokens and click Add token.

2

In Name, enter a name that identifies the token, such as the integration that uses it. The name can have 2 to 64 characters: letters, digits, spaces (including the full-width space), and - _ . : / ( ) [ ] @ + #, as well as full-width ( ).

3

In Role, select the role that sets what the token can access. For help choosing, see Assign a role to an application token.

4

In Set expiry date, keep the default of one year from today or choose another date. The date must be at least tomorrow and less than 10 years from today. The token expires at the end of that day, at 23:59:59 UTC.

5
Optional

To accept requests only from a known address, turn on Add IP restriction and enter one IPv4 address or CIDR range in IP address, for example 203.0.113.42/32. If the token is exposed, requests from other IP addresses are still blocked.

6

Click Add token. The Token created dialog shows your new token.

7

Click Copy token, store the token in a secure location, and then click Done.

You can only see and copy the token in the Token created dialog. After you close it, you can’t retrieve the token again.

After you create a token, you can change its name and role in the Portal. The expiry date and IP restriction are fixed for the life of the token. To change them, add a new token, move your integration to it, and then delete the old one.

Assign a role to an application token

Every application token has exactly one role, and the token can only do what that role allows. It works the same way as a user’s role: a token with the Observer role can read data but can’t change it. You choose the role when you add the token, and you can change it later.

In the Role list, you can choose one of the following:

  • Admin, User, or Observer. For what each role allows, see Roles and permissions.
  • A custom role that your workspace created, if custom roles are available to you.

The Support role can’t be assigned to a token.

Choose the most limited role that fits the integration. If you select Admin, the Portal warns you that anyone with the token has full access to your workspace if it leaks.

Tokens created before roles were available, and tokens created with the v1 application token API, have the Administrator role. To give such a token a more limited role, change its role.

Change a token’s role

You can change the role of an existing token without replacing it. The token value stays the same, so the integration that uses it keeps working without changes.

1

In the token’s row, click Edit token.

2

In Role, select the new role. If the token has the Admin role and you select another role, the Portal warns you that the token keeps only what the new role allows. If you select Admin for a token with another role, the Portal warns you that the token has full access to your workspace.

3

Click Save changes.

Before you limit a token’s role, check that the integration using the token doesn’t need the permissions you’re removing. Requests that the new role doesn’t allow fail.

The new role applies to auth_tokens generated after the change. An auth_token that the integration already holds keeps the old role until it expires. For details, see Assign a role to an application token in the API docs.

View your tokens

The Application tokens table lists the active tokens in your workspace. By default, it shows these columns:

ColumnDescription
NameThe name you gave the token.
Expiry (UTC)The day the token expires. A warning icon marks an expired token, and ∞ marks an older token without an expiry.
RoleThe role that sets what the token can access.
IP restrictionsThe IP address or CIDR range the token accepts requests from. Any means no restriction.
Created byThe user who created the token. A key icon marks a token that another application token created.
Last used (UTC)The day the token was last used to authenticate.

The Created (UTC), Token ID, and Last used IP address columns are hidden by default. To show, hide, or reorder columns, click the Table settings icon at the end of the table header row. For details, see Customize tables in the emnify Portal. Click a column header to sort the table by that column.

Edit a token

1

In the token’s row, click Edit token.

2

In Name, enter the new name.

3

Optional: To change what the token can access, select a new role in Role. For what to check first, see Change a token’s role.

4

Click Save changes.

The Edit token dialog also shows the token’s details, which you can read but not change:

  • Status & usage: when and from which IP address the token was last used, and when it expires.
  • Access: the IP restriction.
  • Origin: when and by whom the token was created and last edited, and the token ID.

Delete a token

Deleting a token is permanent. Integrations that use the token can’t authenticate with it anymore, so add a replacement token first if you still need access.

1

In the token’s row, click Delete token.

2

Check the token name in the confirmation dialog, then click Delete.