Skip to main content
POST
/
base
/
code2token
Code2Token Post
curl --request POST \
  --url https://api.coinfer.ai/base/code2token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "account_type": "google",
  "code": "<string>",
  "code_verifier": "",
  "gh_installation_id": 123
}
'
{
  "status": "<string>",
  "data": {
    "access_token": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
account_type
enum<string>
required

account type

Available options:
google,
microsoft,
github
code
string
required

auth code

code_verifier
string
default:""

code verifier in auth code flow with PKCE

gh_installation_id
integer | null

github installation id

Response

OK

status
string
required
Allowed value: "ok"
data
Code2TokenRsp · object
required