POST https://id.copyleaks.com/v3/account/login/api

Login to the Copyleaks API using your email and API key.

Once logged in, you will get back a login token that will be used to authenticate yourself when calling the other API methods.

After generating the login-token, you should attach the token for your next calls. Attaching the endpoint is done by adding this header to your calls: Authorization: Bearer TOKEN.

A generated token is valid for 48 hours. Within this period of time, you can use it multiple times. Before attaching the Authorization for your next endpoint calls, make sure that the token has not expired. If it expired, generate a new one.

Handle tokens carefully

The Copyleaks API token should be treated as a password. Attackers, who can gain to this token, can access your private information and modified it.

Request

Body Parameters

Name Description

email Required

Your Copyleaks account email address.

String (email)

Example: "[email protected]"

key Required

Your Copyleaks account API key.

String (guid)

Example: "00000000-0000-0000-0000-000000000000"

Request Example

curl -XPOST -H "Content-type: application/json" -d '{
  "email": "[email protected]",
  "key": "00000000-0000-0000-0000-000000000000"
}' 'https://id.copyleaks.com/v3/account/login/api'
POST https://id.copyleaks.com/v3/account/login/api

Content-Type: application/json;

{
  "email": "[email protected]",
  "key": "00000000-0000-0000-0000-000000000000"
}
import requests

headers = {
    'Content-type': 'application/json',
}

data = '{\n  "email": "[email protected]",\n  "key": "00000000-0000-0000-0000-000000000000"\n}'

response = requests.post('https://id.copyleaks.com/v3/account/login/api', headers=headers, data=data)

using (var httpClient = new HttpClient())
{
    using (var request = new HttpRequestMessage(new HttpMethod("POST"), "https://id.copyleaks.com/v3/account/login/api"))
    {
        request.Content = new StringContent("{\n  \"email\": \"[email protected]\",\n  \"key\": \"00000000-0000-0000-0000-000000000000\"\n}", Encoding.UTF8, "application/json"); 

        var response = await httpClient.SendAsync(request);
    }
}
var request = require('request');

var headers = {
    'Content-type': 'application/json'
};

var dataString = '{
  "email": "[email protected]",
  "key": "00000000-0000-0000-0000-000000000000"
}';

var options = {
    url: 'https://id.copyleaks.com/v3/account/login/api',
    method: 'POST',
    headers: headers,
    body: dataString
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'Content-type' => 'application/json'
);
$data = '{
  "email": "[email protected]",
  "key": "00000000-0000-0000-0000-000000000000"
}';
$response = Requests::post('https://id.copyleaks.com/v3/account/login/api', $headers, $data);

Response

Codes

Status Code Description Example
200

The command was executed.

{
  "access_token": "ACLNSKNSDAACCAJANCOIUiausoo_saidjaskldjoa...",
  ".issued": "2018-11-24T16:15:38.2431255+02:00",
  ".expires": "2018-11-24T16:15:38.2431255+02:00"
}
See resource description.
400

Bad request.

{
  "email": ["The email is required."]
}
401

Unauthorized

Wrong email address and \ or key.

{
  "Message":"Bad request. One or several required parameters are missing or incorrect."
}

Description

Name Description

access_token

Your API token details. Use this token to access your private Copyleaks API services.

String

Treat this value as a password.

.issued

Token issue date

String (datetime)

Time zone: UTC+0

.expires

Token expiration date. Your token will be deactivated after this date.

String (datetime)

Time zone: UTC+0