oauth_v1 v1.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Authentication
API Key (Auth Token)
- Parameter Name: SessionToken, in: cookie. Auth Token
API Key (Bearer)
- Parameter Name: Authorization, in: header. Auth Token
API Key (Tenant)
- Parameter Name: Tenant, in: header. Name of tenant
OAuth
Create authorization token
Code samples
# You can also use wget
curl -X GET /app/usermanagement/auth/Authorize \
-H 'Accept: application/json' \
-H 'api-version: string' \
-H 'Authorization: API_KEY' \
-H 'Tenant: API_KEY'
GET /app/usermanagement/auth/Authorize HTTP/1.1
Accept: application/json
api-version: string
const headers = {
'Accept':'application/json',
'api-version':'string',
'Authorization':'API_KEY',
'Tenant':'API_KEY'
};
fetch('/app/usermanagement/auth/Authorize',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'api-version' => 'string',
'Authorization' => 'API_KEY',
'Tenant' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/app/usermanagement/auth/Authorize', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/app/usermanagement/auth/Authorize";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
URL obj = new URL("/app/usermanagement/auth/Authorize");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /app/usermanagement/auth/Authorize
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
client_id | query | string | false | none |
response_type | query | string | false | none |
response_mode | query | string | false | none |
redirect_uri | query | string | false | none |
scope | query | string | false | none |
state | query | string | false | none |
api-version | query | string | false | none |
api-version | header | string | false | none |
Example responses
200 Response
{
"code": "string",
"state": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | AuthAuthorizeResponse |
Get authorization code
Code samples
# You can also use wget
curl -X POST /app/usermanagement/auth/Token \
-H 'Accept: application/json' \
-H 'api-version: string' \
-H 'Authorization: API_KEY' \
-H 'Tenant: API_KEY'
POST /app/usermanagement/auth/Token HTTP/1.1
Accept: application/json
api-version: string
const headers = {
'Accept':'application/json',
'api-version':'string',
'Authorization':'API_KEY',
'Tenant':'API_KEY'
};
fetch('/app/usermanagement/auth/Token',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'api-version' => 'string',
'Authorization' => 'API_KEY',
'Tenant' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/app/usermanagement/auth/Token', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/app/usermanagement/auth/Token";
await PostAsync(null, url);
}
/// Performs a POST Request
public async Task PostAsync(undefined content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(undefined content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
URL obj = new URL("/app/usermanagement/auth/Token");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /app/usermanagement/auth/Token
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
api-version | query | string | false | none |
api-version | header | string | false | none |
Example responses
200 Response
{
"accessToken": "string",
"idToken": "string",
"tokenType": "string",
"expiresIn": 0,
"error": "string",
"errorDescription": "string",
"refreshToken": "string",
"isSuccess": true,
"token": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | AuthTokenResponse |
Get the profile information
Code samples
# You can also use wget
curl -X GET /app/usermanagement/auth/Me \
-H 'api-version: string' \
-H 'Authorization: API_KEY' \
-H 'Tenant: API_KEY'
GET /app/usermanagement/auth/Me HTTP/1.1
api-version: string
const headers = {
'api-version':'string',
'Authorization':'API_KEY',
'Tenant':'API_KEY'
};
fetch('/app/usermanagement/auth/Me',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'api-version' => 'string',
'Authorization' => 'API_KEY',
'Tenant' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/app/usermanagement/auth/Me', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/app/usermanagement/auth/Me";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
URL obj = new URL("/app/usermanagement/auth/Me");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /app/usermanagement/auth/Me
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
access_token | query | string | false | none |
api-version | query | string | false | none |
api-version | header | string | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | None |
Schemas
AuthAuthorizeResponse
{
"code": "string",
"state": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string¦null | false | none | none |
state | string¦null | false | none | none |
AuthTokenResponse
{
"accessToken": "string",
"idToken": "string",
"tokenType": "string",
"expiresIn": 0,
"error": "string",
"errorDescription": "string",
"refreshToken": "string",
"isSuccess": true,
"token": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
accessToken | string¦null | false | none | none |
idToken | string¦null | false | none | none |
tokenType | string¦null | false | none | none |
expiresIn | integer(int32) | false | none | none |
error | string¦null | false | none | none |
errorDescription | string¦null | false | none | none |
refreshToken | string¦null | false | none | none |
isSuccess | boolean | false | read-only | none |
token | string¦null | false | read-only | none |