Skip to main content

Create service token

Contributors netapp-ranuk dmp-netapp

You can create a service access token that can be used by BlueXP internal services and external clients.

Before you begin

You need to obtain the following:

  • client_id
    The application ID that the BlueXP SaaS UI has assigned to your application.

  • client_secret
    The secret generated by the UI when you registered the application.

See Register a service for more information about obtaining these credentials.

1. Generate the service token

This API call uses the Auth0 authentication service and not a NetApp BlueXP service endpoint. You need to review the URL in the curl example and adjust for your environment as needed.

HTTP method Resource path

POST

/oauth/token

Curl example
curl --location --request POST 'https://netapp-cloud-account.auth0.com/oauth/token' --header 'Content-Type: application/json' --d @JSONinput
Input parameters

The JSON input example below includes the list of required input parameters.

JSON input example
{
    "audience": "https://api.cloud.netapp.com",
    "client_id": "TvPPs4SeM5smEElsGmdDUznljhN3YY8s",
    "client_secret": "3ajeU_pG9rngJvsdfFRghtr5G3NnmgdnYG7IVfN5wDR_tnd1-qfScYC_TPraT",
    "grant_type": "client_credentials"
}
Output

The JSON output example below includes the list of returned values. The expires_in value is expressed in seconds.

JSON output example
{
    "access_token": "<SERVICE_TOKEN>",
    "scope": "occm-access",
    "expires_in": 86400,
    "token_type": "Bearer"
}