Overview

You can use this request to return a URL that will automatically log a user in.

You can supply a user ID in the request, and then when someone clicks the URL which is returned, it will log that person in as the user specified in the original request. The system will also redirect the user to the part of the product specified in the redirect.

The Method

PropertyRequestDescription
RestGethttps://[Your URL]/api/2.0/authentication_url/:user_id/:redirect
XML-RPCCallauthenticationUrl.GetAuthenticationUrl

Your method must be structured as follows:

Parameters

PropertyTypeDescription Default RequiredRead Only
$user_idintegerUser identifier.noneyesno
$redirectstringPath to redirect user to once logged in.nonenono

Responses

TypeDescription
object“auth_key”: {
“data”: “Dxo3YVXcrF0AAjR9”
},
“auth_expires”: {
“data”: 1394538677
},
“full_url”: {
“data”: “live.everlytic.net/login/Dxo3YVXcrF0AAjR9”
}

Code Samples

$url = '(Your URL)/api/2.0/authentication_url/1/customers
$method = 'GET';
$cSession = curl_init();
$headers = array();
$auth = base64_encode($username . ':' . $apikey);
$headers[] = 'Authorization: Basic ' . $auth;
curl_setopt($cSession, CURLOPT_URL, $url);
curl_setopt($cSession, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cSession, CURLOPT_HEADER, false);
curl_setopt($cSession, CURLOPT_CUSTOMREQUEST, strtoupper($method));
curl_setopt($cSession, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($cSession);
curl_close($cSession);