Get access token

Method for requesting access-token for online mortgage service.

Received bearer token should be added to all the requests for making call to online mortgage resources.

Request Endpoint

POST https://test-api.tbcbank.ge/oauth/token
POST https://api.tbcbank.ge/oauth/token

Authorization

Authorization TypeDescription
Oauth 2.0Client Credential Flow

Request should contain client_id (apikey) and client_secret (apisecret) values as a basic authentication header.
you can get your apikey and secret values by following this instruction

ParameterTypeDescription
client_idstringdeveloper app apikey
client_secretstringdeveloper app secret

Request Body

Parameters in request body should be passed as
Content-Type: application/x-www-form-urlencoded

ParameterTypeDescription
grant_typestringgrant_type for oauth client credentials flow: should be following:
client_credentials
scopestringoauth scope. should be following:
online_mortgages

Request Sample

curl --location --request POST 'https://test-api.tbcbank.ge/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic U3A2TldhbU5zKKShrVDhSbTFGV3Q1ZEYwWXgwanhYekg6c05HaUdySTk0T3dpUENLRA==' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=online_mortgages'

Response Parameters

ParameterTypeDescription
access_tokenstringAccess token. Used to access resources protected by oauth. The token is reference token.
token_typestringToken type. Currently only BearerToken is supported.
scopestringScope for which access token was issued for.
issued_atintegerUnix timestamp access token was issued at.
expires_inintegerMilliseconds, access token will expire.

Response Sample

{
    "access_token": "vpmnLxpoasdKShdb2Ivky2eW0QEAhDt",
    "token_type": "BearerToken",
    "scope": "online_mortgages",
    "issued_at": "1631105378666",
    "expires_in": 7775999
}

Error Response

In case of error, standard response in problem json will be returned.

Details can be found at Error Code Description