Skip to content

Link Token

Request URL

POST /externalaccount/linktoken

Description

Generate a link token to identify the external account. The token is fetched from a suitable back office.

Schema

Property table for externalaccount/linktoken

Property Description Required Schema
redirectURL A URL to redirect to after requested action takes place No {
  "type": "string",
  "nullable": true
}

Request Body

{
    "redirectURL": "www.asfsdf.something"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "redirectURL": "www.asfsdf.something"
};
const config = {
  method: 'POST',
  url: '${AMPLIFI_BASE_URL}/externalaccount/linktoken',
  headers: {
    'Content-Type': "application/json"
  },
  data
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/externalaccount/linktoken" --data "{    \"redirectURL\":\"www.asfsdf.something\"}" --header "Content-Type: application/json" 

Successful Response Examples

200 EXTERNALACCOUNT/LINKTOKEN

HEADERS

Header Value
Content-Type application/json

REQUEST BODY

{

}

RESPONSE BODY

{
    "success": true,
    "linkToken": "link-production-b66f78d5-2f99-42a9-b2be-0106d2a6233d"
}