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
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",
'token': "A long random string token received from /token request"
},
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" --header "token: A long random string token received from /token request"
Successful Response Examples
200 EXTERNALACCOUNT/LINKTOKEN
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
token | A long random string token received from /token request |
REQUEST BODY
RESPONSE BODY