Obter token de acesso
Troca a credencial por um token de acesso válido por 15 minutos.
POST
https://api.hub.payzu.com.br/api/v1/oauth/tokenResponses
curl -X POST "https://api.hub.payzu.com.br/api/v1/oauth/token" \ -H "Authorization: Basic {{base64(client_id:client_secret)}}" \ -H "Content-Type: application/json" \ -d '{ "grant_type": "client_credentials" }'const body = JSON.stringify({ "grant_type": "client_credentials"})fetch("https://api.hub.payzu.com.br/api/v1/oauth/token", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Basic {{base64(client_id:client_secret)}}" }, body})import requestsurl = "https://api.hub.payzu.com.br/api/v1/oauth/token"body = """{ "grant_type": "client_credentials"}"""response = requests.request("POST", url, data = body, headers = { "Content-Type": "application/json", "Authorization": "Basic {{base64(client_id:client_secret)}}"})print(response.text)