Authentication
How to authenticate requests
Census’ Management APIs require proper authentication to ensure that your requests are secure and have the necessary permissions. The Workspace and Organization APIs both use Bearer authentication but they use different security tokens.
Always keep your tokens private. Avoid exposing them in client-side code or public repositories. If you believe a token has been compromised, regenerate or delete it immediately from the Census application.
Using Bearer Tokens with Workspace APIs
For the Workspace APIs, you’ll need to use a workspace API key for authentication.
- Navigate to the specific workspace you want to interact with.
- In the workspace settings, find the “API Access” section to retrieve your workspace API key.
- Use this token in your request header as:
Authorization: Bearer YOUR_WORKSPACE_ACCESS_TOKEN
Using Bearer Tokens with Organization APIs
For the Organization APIs, Personal Access Tokens are used for authentication. These tokens carry the same permissions as the user who generates them. If you require a token with admin privileges (for example to create & manage workspaces) make sure the user account that creates it has admin permissions.
- Navigate to your user settings page.
- Click on “New Token” under the Personal Access Tokens section to generate or retrieve your personal access token.
- Give your token a unique name so you can remember how it is being used and copy it to your clipboard.
- Use this token in your request header as:
Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN
Was this page helpful?