Authorization
Getting API Credentials
You can follow the steps below to obtain API credentials:
- Log in to the egaranti panel.
- Click on the Settings tab in the left menu.
- Click on the Account Settings button.
- On the Account Settings page, click on the Company Information tab.
- You will find your API Key and SECRET Key on the Company Information page.
- Copy the API Key and SECRET Key for your use.
Test and Production Environment Base URLs
Base Url
- Test
- Prod
https://replica-integration.egaranti.dev
https://tr-integration.egaranti.co
Postman Collection Link
For your convenience, here’s the link to the Postman Collection.
Postman CollectionEstablishing the API Connection
Requests to integration services must be made with a Bearer Token. To create a Bearer Token, send your API Key and SECRET Key (obtained from the above step) to the following endpoint.
Request
curl --location --request POST '<BASE_URL>/auth'
--header 'Content-Type: application/json'
--data '{
"apiKey": "<string>",
"secretKey": "<string>"
}'
Response
{
"jwtToken": "Bearer <string>",
"expiredAt": "2023-08-28 12:04"
}
Caution
The validity period of the returned jwtToken is set to 30 minutes. Once this time expires, you'll need to obtain a new jwtToken. You can check the expiration time using the expiredAt value.
You can make your requests by adding the jwtToken value obtained from this service to the Authorization header in other endpoints. An example request is as follows.
curl --location --request GET '<BASE_URL>/main-categories'
--header 'Content-Type: application/json'
--header 'Authorization: <jwtToken>'