Swift3 / APPIA API / RESEND ACTIVATION CODE
Back to Collection Items
func chilkatTest() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = CkoHttp()!
var success: Bool
// Adds the "Authorization: Bearer <access_token>" header.
http.authToken = "<access_token>"
http.setRequestHeader("Content-Type", value: "application/json")
var resp: CkoHttpResponse? = http.quickRequest("POST", url: "https://domain.com/users/activation_code")
if http.lastMethodSuccess == false {
print("\(http.lastErrorText!)")
return
}
print("\(resp!.statusCode.intValue)")
print("\(resp!.bodyStr!)")
resp = nil
}
Curl Command
curl -X POST
-H "Authorization: Bearer <access_token>"
-H "Content-Type: application/json"
https://domain.com/users/activation_code
Postman Collection Item JSON
{
"name": "RESEND ACTIVATION CODE",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{auth}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/users/activation_code",
"host": [
"{{url}}"
],
"path": [
"users",
"activation_code"
]
}
},
"response": [
]
}