Learn about Staffbase App / Intranet API authentication.
The Staffbase API is secured by
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
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:
HTTP/1.1 200 OKContent-Type: application/json
...