User Requests Authentication

When receiving any requests for API Endpoints except root /jet_api/ you should check user authentication token. Its is passed in Authorization header in each request. It has the following format:

Authorization: Token f42a3cab3f146b283701a4e314f1c7ba57fdb59e

On each request you should take received token hash and make a call to api.jetadmin.io/api/project_auth endpoint as described below. If authentication is failed - you should return 403 HTTP status code.

Check User Authentication

POST https://api.jetadmin.io/api/project_auth/

Query Parameters

NameTypeDescription

string

Headers

NameTypeDescription

User-Agent

string

Your Jet Bridge Type, example: Custom Jet Bridge

Request Body

NameTypeDescription

project_token

string

Your Jet Bridge token, example: b386d491-12cc-212c-81e9-e47bae01be29

token

string

User Authentication header, example: f42a3cab3f146b283701a4e314f1c7ba57fdb59e

permission

string

Checking authentication for some permission

{
    "access_disabled": false,
    "warning": null,
    // custom user properties that can be assigned via Jet Admin
    "user_properties": {
        "district": "central"
    },
    // custom team properties that can be assigned via Jet Admin
    "group_properties": {
        "office": "new_york"
    }
}

// or if doesn't have access to this permission

{
    "access_disabled": true,
    "warning": "You don't have access to countries",
    "user_properties": {},
    "group_properties": {}
}

Last updated