---
updatedAt: 2026-07-15T19:51:35.000Z
agentTools:
  siteIndex: https://docs.cielo.com.br/llms.txt
  projectIndex: https://docs.cielo.com.br/risco/llms.txt
---

# Autenticação

Como obter o token de acesso

<Table>
  <thead>
    <tr>
      <th>
        Ambiente
      </th>

      <th>
        Método
      </th>

      <th>
        Endpoint
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        Sandbox
      </td>

      <td>
        <div class="headline-container-article-info2GaOf2jMpV0r">
          <span class="rm-APIMethod APIMethod APIMethod_fixedWidth APIMethod_post headline-container-api-method1Hc-Fm7uaccR" data-testid="http-method">post</span>
        </div>
      </td>

      <td>
        `https://velocitysandbox.braspag.com.br/oauth2/token`
      </td>
    </tr>

    <tr>
      <td>
        Produção
      </td>

      <td>
        <div class="headline-container-article-info2GaOf2jMpV0r">
          <span class="rm-APIMethod APIMethod APIMethod_fixedWidth APIMethod_post headline-container-api-method1Hc-Fm7uaccR" data-testid="http-method">post</span>
        </div>
      </td>

      <td>
        `https://velocity.braspag.com.br/oauth2/token`
      </td>
    </tr>
  </tbody>
</Table>

<br />

<Callout icon="ℹ️" theme="info">
  ###

  Saiba mais sobre essa funcionalidade <a href="https://docs.cielo.com.br/gateway/docs/velocity" target="_blank">na documentação</a>.
</Callout>

Uma vez em posse da credencial, será necessário "codificá-la" em Base64, utilizando a convenção **client\_id:client\_secret**, e enviar o resultado no cabeçalho através do campo **Authorization**.

Exemplo:

* client\_id: **braspagtestes**
* client\_secret: **1q2w3e4r5t6y7u8i9o0p0q9w8e7r6t5y4u3i2o1p**
* String a ser codificada em Base64: **braspagtestes:1q2w3e4r5t6y7u8i9o0p0q9w8e7r6t5y4u3i2o1p**
* Resultado após a codificação: **YnJhc3BhZ3Rlc3RlczoxcTJ3M2U0cjV0Nnk3dThpOW8wcDBxOXc4ZTdyNnQ1eTR1M2kybzFw**

<br />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "velocity",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://velocitysandbox.braspag.com.br"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/oauth2/token": {
      "post": {
        "summary": "Autenticação",
        "description": "Como obter o token de acesso",
        "operationId": "autenticacao-token",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/x-www-form-urlencoded",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/x-www-form-urlencoded"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Basic YnJhc3BhZ3Rlc3RlczoxcTJ3M2U0cg==",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "description": "VelocityApp"
                  },
                  "grant_type": {
                    "type": "string",
                    "description": "client_credentials"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"access_token\": \"faSYkjfiod8ddJxFTU3vti_ ... _xD0i0jqcw\",\n  \"token_type\": \"bearer\",\n  \"expires_in\": 599\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string",
                      "example": "faSYkjfiod8ddJxFTU3vti_ ... _xD0i0jqcw"
                    },
                    "token_type": {
                      "type": "string",
                      "example": "bearer"
                    },
                    "expires_in": {
                      "type": "integer",
                      "example": 599,
                      "default": 0
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```