post https://cieloecommerce.cielo.com.br/api/public/v2/token
Generates the access token that should be used in the header of requests to the Payment Link, Checkout and Transaction Management APIs.
To gain access to Cielo services that use Cielo Oauth, you will need to obtain an access token, following the steps below:
- Concatenate the
ClientId
andClientSecret
,**ClientId:ClientSecret**
; - Encode the result in Base64;
- Send the token creation request using the HTTP POST method.
Example of Concatenation
FIELDS | FORMAT |
---|---|
ClientId | b521b6b2-b9b4-4a30-881d-3b63dece0006 |
ClientSecret | 08Qkje79NwWRx5BdgNJsIkBuITt5cIVO |
ClientId:ClientSecret | b521b6b2-b9b4-4a30-881d-3b63dece0006:08Qkje79NwWRx5BdgNJsIkBuITt5cIVO |
Base64 | YjUyMWI2YjItYjliNC00YTMwLTg4MWQtM2I2M2RlY2UwMDA2OjA4UWtqZTc5TndXUng1QmRnTkpzSWtCdUlUdDVjSVZP |
The duration of the token is 20 minutes.
The returned token (
access_token
) must be used in every request to the Payment Link, Checkout and Transaction Management APIs as an authorization key. Theaccess_token
has a validity of 20 minutes (1200 seconds) and it is necessary to generate a new token every time the validity expires.