Create a workspace API token, then call GET /v1/offices to list your offices. It takes about five minutes.
Who can do this: Account Admins create the token. Anyone with the token can then call the API.
Create a token
Section titled “Create a token”Slack
- In Officely, on the Home tab, open Go to… > All settings > Account & Billing.
- Under API token, select Create token.
- Enter a Token name and select Create.
- Copy the token from API token created.
Microsoft Teams
- In the Officely tab, select Settings > Account & Billing. It isn’t shown on mobile.
- Under API tokens, enter a Token name and select Create token.
- Select Copy token, then Done.
You only see the token once. A workspace can have one active token, so revoke any existing one first. Anything using the old token stops working. More in API access.
Store the token
Section titled “Store the token”Keep the token in a password manager or your integration’s secret store. If you lose it, revoke it and create a new one.
For the commands below, put it in an environment variable. read -s keeps it out of your shell history:
read -s OFFICELY_API_TOKEN # paste the token, then press Enterexport OFFICELY_API_TOKENMake your first call
Section titled “Make your first call”curl https://api.officelycrew.com/v1/offices \ -H "Authorization: Bearer $OFFICELY_API_TOKEN"See the response
Section titled “See the response”You get your workspace’s offices. The id is what other endpoints take in officeIds.
{ "data": [ { "id": "k7Qe2vXbN9pL4tRw8sYcZ", "name": "London HQ", "emoji": "🏢", "timezone": "Europe/London", "country": "United Kingdom" } ]}Got 401 UNAUTHORIZED? The token is missing, mistyped or revoked. Check the header is Authorization: Bearer <token>.
Next steps
Section titled “Next steps”- Try every endpoint in the interactive docs: select Authorize and paste the token without
Bearer. - Read Pagination and Rate limits before you loop over pages.
- Browse the endpoint reference.
Related
Still need help? Chat to our support team.
Contact support