Authentication is how you prove who you are to the Sabrhub API system. It is like showing your ID card to enter a building.
All Sabrhub APIs use Bearer token authentication. A Bearer token is like a special password that proves you have permission to use the API.
Contact Sabrhub Support to get your API token:
- Send an email to support@sabrhub.com
- Tell them what you want to build with the API
- They will send you a secure API token
- Save this token safely
Before using any API, you need to login first.
Send a POST request to the login endpoint:
POST https://usermanagement.sabrhub.com/v1/auth/login
Content-Type: application/json
{
"username": "test@email.com",
"password": "yourpassword"
}When login is successful, you get back:
{
"username": "test@email.com",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expirationTimeInUTC": "2024-02-29T15:09:14.242875589",
"roles": ["CSP_BUSINESS"],
"tenantId": "Sabrhub",
"services": ["Teams"]
}The most important part is the accessToken. This is what you will use in all your API calls.
For every API call you make, include your access token in the Authorization header:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...GET https://context-webex.sabrhub.com/api/v1/enterprise/getenterprise/E0000090
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Access tokens expire after some time. When your token expires, use the refresh token to get a new one.
POST https://usermanagement.sabrhub.com/v1/auth/getaccesstoken
Content-Type: application/json
{
"username": "test@email.com",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}- Never share your API token with anyone
- Never put your token in websites or client-side code
- Store your token in a secure place like environment variables
- If your token is stolen, contact support immediately
Use these URLs when testing your integration:
- Authentication: https://usermanagement.sabrhub.com/v1
- Webex API: https://webex-dev-frontend.sabrhub.com/api/v1
- Teams API: https://teams-dev-frontend.sabrhub.com/api/v2
- ContextRegister API: https://cr-dev.sabrhub.com/api/v1
Use these URLs when your integration is ready for real customers:
- Authentication: https://usermanagement.sabrhub.com/v1
- Webex API: https://context-webex.sabrhub.com/api/v1
- Teams API: https://context-sms.sabrhub.com/api/v2
- ContextRegister API: https://contextregister.sabrhub.com/api/v1