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
Property | Request | Description |
---|---|---|
Rest | Get | https://[Your URL]/api/2.0/authentication_url/:user_id/:redirect |
XML-RPC | Call | authenticationUrl.GetAuthenticationUrl |
Your URL is the address of your install.
Your method must be structured as follows:
GetAuthenticationUrl(intger $user_id, string redirect)
Parameters
Property | Type | Description | Default | Required | Read Only |
---|---|---|---|---|---|
$user_id | integer | User identifier. | none | yes | no |
$redirect | string | Path to redirect user to once logged in. | none | no | no |
Responses
Type | Description |
---|---|
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);