Getnet OAuth2 Token API — Functional Documentation
Overview
This API provides authentication via OAuth2 Client Credentials Flow for the Getnet staging environment. It issues access tokens required to authenticate all subsequent calls to Getnet APIs.
Environment
| Environment | Base URL |
|---|---|
| Staging | https://api-homologacao.getnet.com.br/auth/oauth2 |
Endpoint
POST /token — Get Access Token
Generates a JWT access token using client credentials. The token must be included as a
Bearer token in the Authorization header of all subsequent API requests.Content-Type:
application/x-www-form-urlencodedRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| grant_type | string | Yes | Must be client_credentials |
| client_id | string | Yes | Unique client identifier provided by Getnet |
| client_secret | string | Yes | Client secret key provided by Getnet |
Responses
| Code | Description | Key Fields |
|---|---|---|
| 200 | Token successfully generated | access_token, token_type (Bearer), expires_in (seconds), scope |
| 400 | Bad request — missing or incorrect parameters | error, error_description |
| 401 | Invalid credentials | error, error_description |
| 500 | Internal server error | error, error_description |
On this page
Getnet OAuth2 Token API — Functional Documentation