Chilkat Online Tools

phpExt / Coupa Postman Collection - OAuth - Master / Retrieve User by login

Back to Collection Items

<?php

include("chilkat_9_5_0.php");

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

$http = new CkHttp();

$queryParams = new CkJsonObject();
$queryParams->UpdateString('login','CoupaSam1');

// Adds the "Authorization: Bearer <access_token>" header.
$http->put_AuthToken('<access_token>');

// resp is a CkHttpResponse
$resp = $http->QuickRequestParams('GET','https://domain.com/users/',$queryParams);
if ($http->get_LastMethodSuccess() == false) {
    print $http->lastErrorText() . "\n";
    exit;
}

print $resp->get_StatusCode() . "\n";
print $resp->bodyStr() . "\n";


?>

Curl Command

curl -G -d "login=CoupaSam1"
	-H "Authorization: Bearer <access_token>"
https://domain.com/users/

Postman Collection Item JSON

{
  "name": "Retrieve User by login",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{URL}}/users/?login=CoupaSam1",
      "host": [
        "{{URL}}"
      ],
      "path": [
        "users",
        ""
      ],
      "query": [
        {
          "key": "login",
          "value": "CoupaSam1"
        }
      ]
    }
  },
  "response": [
  ]
}