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.

  1. Navigate to the specific workspace you want to interact with.
  2. In the workspace settings, find the “API Access” section to retrieve your workspace API key.
  3. 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.

  1. Navigate to your user settings page.
  2. Click on “New Token” under the Personal Access Tokens section to generate or retrieve your personal access token.
  3. Give your token a unique name so you can remember how it is being used and copy it to your clipboard.
  4. Use this token in your request header as:
Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN