Miscellaneous - Auth



Endpoint

POST /v1.1/auth

Description

Used to verify an authentication via the Appreciation Engine once an access token has been received.

You will receive a token in your return url after opting in via the sign in widget, which can then be passed to the auth call via a GET request. If successful a JSON object containing the user's Appreciation Engine details will be returned.

Parameters
required *

apiKey *  string Your API access key
accessToken *  string Your access token
details  boolean value of 1 to show slightly expanded view of user, including linked services - default 0
extended  boolean value of 1 to show extended data node for user
fields  string comma separated set of fields to explicitly return from details and extended view. eg. fields=email,username,extended.lastUpdated

Sign in with your developer account to use the console, or sign up here

Example Request

curl -X POST "https://api.theappreciationengine.com/v1.1/auth?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&accesstoken=123456789%7C1.aBCDEfgH_987654__3210.12345678%7CABC0def2"
$curl = curl_init();

curl_setopt_array($curl, array( 
	CURLOPT_URL => "https://api.theappreciationengine.com/v1.1/auth?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&accesstoken=123456789%7C1.aBCDEfgH_987654__3210.12345678%7CABC0def2", 
	CURLOPT_RETURNTRANSFER => true, 
	CURLOPT_ENCODING => "", 
	CURLOPT_MAXREDIRS => 10, 
	CURLOPT_TIMEOUT => 0, 
	CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 
	CURLOPT_CUSTOMREQUEST => "POST", 
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.theappreciationengine.com/v1.1/auth?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&accesstoken=123456789%7C1.aBCDEfgH_987654__3210.12345678%7CABC0def2"

headers = {}
payload = {}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
var request = require('request');
var options = {
	'method': 'POST',
	'url': 'https://api.theappreciationengine.com/v1.1/auth?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&accesstoken=123456789%7C1.aBCDEfgH_987654__3210.12345678%7CABC0def2',
	'headers': {}
};
request(options, function (error, response) {
	if (error) throw new Error(error);
	console.log(response.body);
});