Chilkat Online Tools

Objective-C / APPIA API / RESEND ACTIVATION CODE

Back to Collection Items

#import <CkoHttp.h>
#import <CkoHttpResponse.h>

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

CkoHttp *http = [[CkoHttp alloc] init];
BOOL success;

// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = @"<access_token>";
[http SetRequestHeader: @"Content-Type" value: @"application/json"];

CkoHttpResponse *resp = [http QuickRequest: @"POST" url: @"https://domain.com/users/activation_code"];
if (http.LastMethodSuccess == NO) {
    NSLog(@"%@",http.LastErrorText);
    return;
}

NSLog(@"%d",[resp.StatusCode intValue]);
NSLog(@"%@",resp.BodyStr);

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": [
  ]
}