Skip to content

Example Authentication

Checking Authentication

Note

This is an endpoint for authentication testing.

This endpoint can be called whether the request is fully authenticated or not.

Please keep in mind that this endpoint will always return HTTP 200. Also we'll later throttle the requests.

Action Parameters Description
get null Endpoint for authentication testing.
Endpoint
GET
.../api/v2/users/auth/

Example Request

curl --location --request GET '{{endpoint}}'
var axios = require('axios');

var config = {
  method: 'get',
  url: '{{endpoint}}',
  headers: { }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("{{endpoint}}")
  .method("GET", body)
  .build();
Response response = client.newCall(request).execute();
import requests

url = "{{endpoint}}"

payload={}
headers = {}

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

print(response.text)

Example Response

{
    "id": 105,
    "authenticated": true,
    "email": "user@example.com",
    "fullName": "Example User",
    "active": true,
    "staff": false,
    "super": false,
    "password_changable": true,
    "route": "app",
    "organizations": [
        {
            "id": 105,
            "prefix": "0123abc",
            "currentSelected": true,
            "name": "Example Organization",
            "subscription": null,
            "quantity": 100,
            "adminActivated": true
        }
    ],
    "invitations": [],
    "tokens": {
        "count": 1,
        "values": [
            {
                "token": "0123abc.b123a321c",
                "creator": "Example User",
                "name": "Example Token",
                "description": "Example Token Description 1",
                "created": "12/20/2024, 03:48:05"
            }
        ]
    },
    "teams": [
        {
            "id": 124,
            "name": "Example Team1",
            "currentSelected": false
        },
        {
            "id": 123,
            "name": "Example Default Team",
            "currentSelected": true
        }
    ],
    "organization": {
        "organizationId": 60,
        "organizationPrefix": "0123abc"
    }
}
{
    "id": null,
    "authenticated": false,
    "email": null,
    "fullName": null,
    "active": false,
    "staff": false,
    "super": false,
    "password_changable": null,
    "route": "public",
    "organizations": [],
    "teams": [],
    "organization": {}
}