Learn about Staffbase App / Intranet API authentication.
The Staffbase API is secured by HTTPS and basic authentication. Learn more about security at Staffbase website.
For performing requests on our API, you need the following from the API token page in the Staffbase Studio:
-
Create an API token.
For example, an API token you created looks like:
dGVzdDEyMzQ2Nzg6dGVzdDEyMzQ2Nzg= -
Copy the base URL of your Staffbase platform.
For example, the base URL of your Staffbase platform looks like:https://exampleapp.staffbase.com/api
You need the base URL and the API token to create an API request.
You need to add the base URL as the host on every request within the authorization header.
For example,
Host: exampleapp.staffbase.com
You need to add the API token on every request within the authorization header as follows:
Authorization: Basic {{insert-your-token-here}}
An example of a plain API request is as follows:
GET /api/users HTTP/1.1Host: exampleapp.staffbase.comAuthorization: Basic dGVzdDEyMzQ2Nzg6dGVzdDEyMzQ2Nzg=
When the API request works as expected, you receive an HTTP response with the status code 200 and response data.
For example:
1HTTP/1.1 200 OK2Content-Type: application/json34...