On This Page
Limited Availability
Request an Access Token
Use this section to enable your system to request an access token from
Cybersource
. An access token enables your system to send API requests
on-behalf of another organization. When your system sends this request, the signed JWT
that contains the request must also contain a client assertion.Endpoints
Production:
POST
https://api.cybersource.com
/oauth2/v4/tokenTest:
POST
https://apitest.cybersource.com
/oauth2/v4/tokenHTTP Header
Set the HTTP header to:
Content-Type:
application/x-www-form-urlencoded
Required Request Parameters
Request Parameter | Description |
|---|---|
grant_type | Set to client_credentials . |
client_assertion_type | Set to
urn:ietf:params:oauth:client-assertion-type:jwt-bearer . |
client_assertion | The signed JWT client assertion. For more information about how to
create a client assertion, see Create a Client Assertion JWT. |
Example: Requesting an Access Token
Endpoint
POSThttps://api.cybersource.com/oauth2/v4/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials &client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer &client_assertion={signed_jwt}
Response to a Successful Request
{ "access_token": "eyJh.bGciOi_EXAMPLE_ACCESS_TOKEN_adQssw5c", "token_type": "bearer", "expires_in": 900, "client_status": "active" }
Response Fields
Parameter | Description |
|---|---|
access_token | The token used to authenticate API requests. Include this
value in the Authorization header as a bearer
token. For more information about how to send an API request
using the access token, see Send a Request On-Behalf of a Merchant. |
client_status | The status of the client, such as
active . |
expires_in | The amount of time an access token is valid after being
issued, in seconds. |
token_type | The type of token issued, such as
bearer . |