Skip to main content
POST
/
connection
/
public_token
/
exchange
Exchange public token for an access token
curl --request POST \
  --url https://sandbox.deck.co/api/v1/connection/public_token/exchange \
  --header 'Content-Type: application/json' \
  --header 'x-deck-client-id: <api-key>' \
  --header 'x-deck-secret: <api-key>' \
  --data '{
  "public_token": "<string>"
}'
{
  "access_token": "<string>",
  "connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fields": [
    {
      "field_name": "<string>",
      "field_value": "<string>"
    }
  ]
}

Authorizations

x-deck-client-id
string
header
required

Enter your client id

x-deck-secret
string
header
required

Enter your secret

Body

public_token
string
required

Your public_token, obtained from the Link onSuccess callback

Minimum length: 1

Response

OK

fields
object[]
required

List of non-sensitive values provided from the Link session by the user

access_token
string

The access token associated with the connection data is being requested for

connection_id
string<uuid>

The Deck Connection ID for the connection associated with the returned access token

I