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.

post
Check User Authentication

https://api.jetadmin.io/api/project_auth/
Request
Response
Request
Headers
User-Agent
optional
string
Your Jet Bridge Type, example: Custom Jet Bridge
Query Parameters
optional
string
Body Parameters
project_token
required
string
Your Jet Bridge token, example: b386d491-12cc-212c-81e9-e47bae01be29
token
required
string
User Authentication header, example: f42a3cab3f146b283701a4e314f1c7ba57fdb59e
permission
optional
string
Checking authentication for some permission
Response
200: OK
{
"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": {}
}
403: Forbidden
User does not have access to this project