marcialwushu / DOTNETCoreApiFake

:book: API Fake com Response Mockado simulando uma API real da IS2B
1 stars 0 forks source link

token #2

Open marcialwushu opened 3 years ago

marcialwushu commented 3 years ago

POST

/v5​/token

parameter type
client_id string
grant_type string
client_secret string

Response

Curl

curl -X POST "https://sandbox-apicorp.celcoin.com.br/v5/token" -H  "accept: */*" -H  "Authorization: Bearer" -H  "Content-Type: multipart/form-data" -F "client_id=41b44ab9a56440.teste.celcoinapi.v5" -F "grant_type=teste" -F "client_secret=e9d15cde33024c1494de7480e69b7a18c09d7cd25a8446839b3be82a56a044a3"

Request URL

https://sandbox-apicorp.celcoin.com.br/v5/token

Server response

Code Details
400 Error: Bad Request

Response body

{
  "errorCode": "999",
  "message": "Invalid grant type"
}

Response headers

 content-length: 50  
content-type: application/json; 
charset=utf-8  
date: Sun, 31 Jan 2021 00:41:39 GMT  
server: Microsoft-IIS/10.0  
x-powered-by: ASP.NET 

 

marcialwushu commented 3 years ago

Autenticação

https://openfinance.api.celcoin.com.br/openbanking/v5/token

cURL sandbox

curl -X POST "https://sandbox.openfinance.celcoin.com.br/openbanking/v5/token" -H "accept: /" -H "Content-Type: multipart/form-data" -F "client_id=$CLIENT_ID" -F "grant_type=$GRANT" -F "client_secret=$SECRET"

200 OK

{
  "access_token": "(...)",
  "expires_in": 999,
  "token_type": "bearer"
}

400 Bade Request

{"errorCode":"999","message":"Invalid grant type"}

cURL production

curl -X POST "https://openfinance.api.celcoin.com.br/openbanking/v5/token" -H "accept: /" -H "Content-Type: multipart/form-data" -F "client_id=$CLIENT_ID" -F "grant_type=$GRANT" -F "client_secret=$SECRET"