Authentication
1. Generate Service Account
A service account is a special type of non-human client that is granted limited access to your organization's resources.
Permissions to the resources of your organization are controlled by assigning scopes to the service account.
Each CMP Account is uniquely identified by a Tenant ID (also referred to as a Vault ID or Account ID). CMP Accounts are accessed programmatically using Service Account credentials.
You can generate a Service Account in the dashboard or create one using the VGS Command Line Interface (CLI)
Generate a Service Account through UI:
Generate a Service Account through CLI:
Execute the sample code below, which will create credentials.yaml file:
2. Generate Access Token
To authenticate with the CMP APIs, you should use the CLIENT_ID and CLIENT_SECRET generated in the previous step to create an access_token.
The generated token can now be used with the CMP APIs. Please note that this access_token is valid only for 20 minutes. After expiry, you can generate a new access token using the same process. refresh_token should not be used. Pass the created access_token as an Authorization: Bearer ${VGS_ACCESS_TOKEN} header in each API call.
3. Generate Access Credentials
To create access credentials, go to the Vault Dashboard > Vault > Vault Settings > Access Credentials and press the "Generate Credentials" button. When Access Credentials are generated, you will be prompted to download them.

If you lose these credentials, you can generate a new pair following the same process.
Last updated



