autoit / Bond APIs / Generate Plaid Link Token
Back to Collection Items
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess
$oHttp.SetRequestHeader "Identity","{{identity}}"
$oHttp.SetRequestHeader "Authorization","{{authorization}}"
$oSbResponseBody = ObjCreate("Chilkat.StringBuilder")
$bSuccess = $oHttp.QuickGetSb("https://{{environment}}.bond.tech/api/v0/accounts/:account_id/external_accounts/plaid",$oSbResponseBody)
If ($bSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
ConsoleWrite("Response status code = " & $oHttp.LastStatus & @CRLF)
ConsoleWrite($oSbResponseBody.GetAsString() & @CRLF)
Curl Command
curl -X GET
-H "Identity: {{identity}}"
-H "Authorization: {{authorization}}"
https://{{environment}}.bond.tech/api/v0/accounts/:account_id/external_accounts/plaid
Postman Collection Item JSON
{
"name": "Generate Plaid Link Token",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [
{
"key": "Identity",
"value": "{{identity}}",
"type": "text"
},
{
"key": "Authorization",
"value": "{{authorization}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{environment}}.bond.tech/api/v0/accounts/:account_id/external_accounts/plaid",
"protocol": "https",
"host": [
"{{environment}}",
"bond",
"tech"
],
"path": [
"api",
"v0",
"accounts",
":account_id",
"external_accounts",
"plaid"
],
"variable": [
{
"key": "account_id",
"value": ""
}
]
}
},
"response": [
{
"name": "example",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Identity",
"value": "{{identity}}",
"type": "text"
},
{
"key": "Authorization",
"value": "{{authorization}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://sandbox.bond.tech/api/v0/accounts/:account_id/external_accounts/plaid",
"protocol": "https",
"host": [
"sandbox",
"bond",
"tech"
],
"path": [
"api",
"v0",
"accounts",
":account_id",
"external_accounts",
"plaid"
],
"variable": [
{
"key": "account_id",
"value": ""
}
]
}
},
"_postman_previewlanguage": "json",
"header": null,
"cookie": [
],
"body": "{\n \"linked_account_id\": \"1a130d45-3dc3-4c58-b0d8-9784aae0d009\",\n \"status\": \"inactive\",\n \"link_token\": \"link-sandbox-09fa148c-497a-4a22-87c9-581a7dea46de\",\n \"expiration\": \"2021-01-27T23:29:06Z\"\n}"
}
]
}