Generate a token for a service account
Overview
This flow describes how to generate a token for a service account. The service account uses the token to reach Care.
You also use this flow to replace a token with a new one. Care shows Manage Token only to the person who created the service account.
Pre-requisites
- You created the service account. See Create a service account.
- You have the permissions listed below.
Permissions
| Permission | Access |
|---|---|
| Can List Users in an Organizations | Opens the Service accounts tab of a government organization, where you find the service account. Hold it in the organization or a parent organization. By default, the Volunteer, Doctor, Nurse, Staff and Administrator roles hold it in a government organization. |
Care shows Manage Token only to the person who created the service account.
Steps
1. Open the profile of the service account
This page starts from the Service accounts tab of a government organization where the service account has a role. If it has no role there, see Add a service account to an organization or department.
On your dashboard, select the Governance tab. Select the organization.
Select the Service accounts tab.
A sub-organization has its own Service accounts tab. To open a sub-organization, see Open a government organization.
In the row of the service account, select View. Care opens the profile of the service account.
The profile shows Service account next to the username.

2. Read the caution
Find the Manage Token section on the profile.
Note: If you did not create the service account, Care does not show Manage Token.
The Caution box lists three points:
- If you generate a new token, any older token becomes invalid.
- Care shows the token one time only. Store it securely.
- Anyone who has the token can access Care as this service account.

3. Generate the token
Select Generate Token.
Care does not ask you to confirm. While Care works, the button shows Generating....
If the service account already has a token, Care deletes it and creates a new one. Give the new token to each application that used the old token.

4. Copy the token
Care opens the Token generated successfully dialog. The token shows under Service Account Token.
Select the copy button. Care shows Token copied to clipboard.
Store the token in a secure place.

5. Close the dialog
The Important Note in the dialog says that Care shows the token one time only.
Close the dialog only after you store the token. When you close it, Care removes the token from the page. You cannot see it again.
If you lose the token, generate a new one. The new token replaces the lost one.

Expected Outcome
- The service account has one token, and you have a copy of it.
- If the service account had an older token, Care deleted it.
- The token has no expiry date in Care. Care keeps the token until you generate a new one or revoke it.
Related
Concepts:
Flows: