Autenticação
Obter token de acesso
Troca client_id e client_secret por um token de acesso.
Credenciais da integração. Também aceitas em Authorization: Basic, com apenas grant_type no corpo.
Definições TypeScript
Use o tipo request body no seu código TypeScript.
Pedido de token (RFC 6749, seção 4.4). Em JSON os campos também são aceitos em camelCase (grantType, clientId, clientSecret).
Corpo da resposta
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.meupedido.io/open-delivery/oauth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials" \ -d "client_id=mp_7f3a9c1e5b2d4a6f8e0c1b3d" \ -d "client_secret=$CLIENT_SECRET"{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...", "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...", "token_type": "bearer", "tokenType": "bearer", "expires_in": 3600, "expiresIn": 3600, "scope": "orders:read orders:write merchant:read catalog:read"}