lianja / APPIA API / GET PAYMENT LINKS
Back to Collection Items
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loHttp = createobject("CkHttp")
// Adds the "Authorization: Bearer {{auth}}" header.
loHttp.AuthToken = "{{auth}}"
loHttp.SetRequestHeader("Content-Type","application/json")
loSbResponseBody = createobject("CkStringBuilder")
llSuccess = loHttp.QuickGetSb("https://domain.com/plink/",loSbResponseBody)
if (llSuccess = .F.) then
? loHttp.LastErrorText
release loHttp
release loSbResponseBody
return
endif
? "Response status code = " + str(loHttp.LastStatus)
? loSbResponseBody.GetAsString()
release loHttp
release loSbResponseBody
Curl Command
curl -X GET
-H "Authorization: Bearer <access_token>"
-H "Content-Type: application/json"
-H "Authorization: Bearer {{auth}}"
https://domain.com/plink/
Postman Collection Item JSON
{
"name": "GET PAYMENT LINKS",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{auth}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{auth}}"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/plink/",
"host": [
"{{url}}"
],
"path": [
"plink",
""
]
}
},
"response": [
]
}