Revenue APIs that use Zuora OneID authenticate with OAuth 2.0 client credentials. Register an OAuth client, request an access token, and send the token as a bearer token on each request.
As part of the transition to OneID OAuth authentication, the host name for all Revenue API endpoints has changed to one.zuora.com.
| Environment | Example |
|---|---|
| Legacy | https://customer-snd01.revprooncloud.com/api/integration/v1/journal/list |
| OneID OAuth | https://one.zuora.com/revenue/api/integration/v1/journal/list |
- In the OneID Admin Console, go to Settings > Manage OAuth 2.0 Clients.
- Click New, then API access.
- Configure the client:
- Integration name: A descriptive name, such as
Revenue OneID client. - Product line: Revenue
- Authorization Grant Type: Client Credentials
- Scope Type: User
- Select User: The API user login name
- Tenant ID: The Revenue tenant to access
- Integration name: A descriptive name, such as
- Click Save. Copy the Client ID and Client Secret. The secret is shown only once.
For more information, see Create OAuth tokens for calling Revenue APIs.
Send your client credentials to the OneID token endpoint.
| Method | POST |
| URL | https://one.zuora.com/oauth2/token |
| Header | Content-Type: application/x-www-form-urlencoded |
| Body | client_id, client_secret, grant_type=client_credentials |
curl --request POST \
--url 'https://one.zuora.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=<clientId>' \
--data-urlencode 'client_secret=<clientSecret>' \
--data-urlencode 'grant_type=client_credentials'A successful response includes access_token. Tokens typically expire in 3599 seconds (about one hour). Reuse the token until it expires.
{
"access_token": "<access_token>",
"token_type": "Bearer",
"expires_in": 3599
}Add the token to the Authorization header as Bearer <access_token>. In Postman, set the authorization type to Bearer Token and paste the token value.
For example:
curl --request GET \
--url 'https://one.zuora.com/revenue/api/integration/v1/journal/list' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json'