Authentication
All the APIs are secured with a bearer token and encrypted private key. Get a token once, then send it on every other call.
Get Token
Use this API to create a new token, which is valid until expires_on (expires_in seconds from now).
You need to make a POST call to the following url:
POST/v1/Auth/GetToken
Required headers
Required header keys with encrypted values:
| Key | Description |
|---|---|
| api-secret-Key | Phone number of customer, later allowed to get customer's sepecific data |
| api-secret-id | Date time stamp + end-point |
| Content-Type | application/json |
Request body
| Field | Type | Limit | Required | Description |
|---|---|---|---|---|
| username | string | 5-20 characters | Yes | Bima API user Id/Email |
| password | string | 100-500 characters | Yes | API user encrypted password |
| client_type_id | int | - | Optional | Website: 1, Mobile: 2, Kiosk: 3 |
{
"username": "TestUser012",
"password": "slidielsijlsdklsje4a54seqt5424fgh54t5yut24fg41fg4ergsdf+45relkjsdfkljirld4dferrrrasa;lkl4=",
"client_type_id": 1
}
{
"status_code": "200",
"status_message": "",
"data": {
"access_token": "eyJhbGciOiJI...",
"access_token_type": "Bearer",
"expires_on": "2026-10-04T13:33:48.3147165+04:00",
"expires_in": 86400,
"customer_id": "dDE3ZVJC..."
},
"messages": []
}
Response fields
| Field | Type | Description |
|---|---|---|
| access_token | string | Token to send in the Authorization header |
| access_token_type | string | Always Bearer |
| expires_on | string | Expiry date and time (ISO 8601, Oman time) |
| expires_in | number | Seconds until the token expires. Request a new token before this time; do not assume a fixed lifetime. |
| customer_id | string | Encrypted customer id linked to the token |
Using the token
Send the token on every other call in the Authorization header:
curl -X POST "https://uatapi.bima.om/v1/Quotation/Read" \
-H "Authorization: Bearer eyJhbGciOiJI..." \
-H "Content-Type: application/json" \
-d '{ "quotation_id": "dldTUytwK0tReHpW...", "lang_code": "en" }'
Token lifetime
Tokens last about 24 hours. Reuse the same token until it expires; on HTTP
401 get a new token and retry the call once.
Note
The required body for partner integrations (
username, password, client_type_id) is being confirmed with the API team.
Use the credentials provided with your API account.