Authentication
Passing Authentication
The Opentact API will require an API Key to authenticate requests.
All API requests are required to be made over HTTPS, HTTP requests will return back a 301 response - permanent redirection.
There are 5 methods to pass authentication to the API.
For accessing the API a valid email and password must be passed in the 'Authorization' header.
The following syntax must be used in the header 'Authorization: Basic base64(email:password)'
A valid token is base64 encoded value of 'email:password'
The following syntax must be used in the headers:
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=vSecurity Scheme Type
HTTP Authorization Scheme
HTTP
Basic
For accessing the API a valid JWT token must be passed to the query:
in
X-Auth-Tokenheader.as
jwtquery param.as
jwtformdata body param
A valid token is generated by the API and returned as a response of
a call to the route: /rest/auth giving a valid email & password.
The following syntax must be used in the headers:
X-Auth-Token: xxxxxx.yyyyyyy.zzzzzzHeader Parameter Name
Security Scheme Type
X-Auth-Token
API Key
For accessing the API a valid Google token must be passed to the query:
in
X-Auth-Google-Tokenheader.as
google_tokenquery param.as
google_tokenformdata body param
More info can be found here: https://developers.google.com/identity/sign-in/web/backend-auth
Header Parameter Name
Security Scheme Type
X-Auth-Google-Token
API Key
For accessing the API a valid Facebook token must be passed to the query:
in
X-Auth-Facebook-Tokenheader.as
facebook_tokenquery param.as
facebook_tokenformdata body param
More info can be found here: https://developers.facebook.com/docs/facebook-login/web
Header Parameter Name
Security Scheme Type
X-Auth-Facebook-Token
API Key
For accessing the API a valid HA1B token must be passed to the query:
in
X-Auth-HA1B-Tokenheader.as
ha1bquery param.as
ha1bformdata body param
More info could be found here: https://www.opensips.org/Documentation/TipsFAQ#toc2
Header Parameter Name
Security Scheme Type
X-Auth-HA1B-Token
API Key
Methods
Auth
GET https://api.opentact.org/rest/auth
This will authenticate the user.
Code Examples
Token
POST https://api.opentact.org/rest/token
This will create a new bearer token.
Request Body
name
string
Name
ttl
integer
Time to live (min 60)
Code Examples
Tokens
GET https://api.opentact.org/rest/token/list
This will return a list of tokens.
Code Examples
Token
PATCH https://api.opentact.org/token/{uuid}
TBD
Path Parameters
uuid
string
Code Examples
Tokens
DELETE https://api.opentact.org/rest/token/all
This will delete all tokens
Code Examples
Token
DELETE https://api.opentact.org/rest/token/{token}
This will delete a specific token
Path Parameters
string
Code Examples
Last updated
Was this helpful?