We are using cookies in our website in order to offer better service to you. You allow us to use cookies by continuing to use our internet website. You can reach the detailed information on cookies from our Privacy Policy and Cookies Policy.
X
Home > Api Products > Server to Server Security

Server to Server Security

Description

​Provides server to server security with OAuth protocol which is to acquire authorize codes and access tokens for other APIs. You need “Service Account” to obtain authorization code. You can use the ID and Secret below in sandbox environment.

Service Account ID: 12a42d02-0845-46f8-b6e2-202e1e792364

Service Account Secret: AQvfpNrjQAiOcQQxKdwGoC860yVdvE3D2iRGsjZ2qwoeYlZ5po

How it Works

Code Request

GET {API_HOST}/api/v1/s2s-oauth2/code

Headers:
X-Service-Account-ID: 12a42d02-0845-46f8-b6e2-202e1e792364
X-Service-Account-Secret: AQvfpNrjQAiOcQQxKdwGoC860yVdvE3D2iRGsjZ2qwoeYlZ5po
X-IBM-client-id: {YOUR_CLEINT_ID} 
X-IBM-client-secret: {YOUR_CLIENT_SECRET} 
scope:read:accounts all:remittance all:eft

Token Request

GET {API_HOST}/api/v1/s2s-oauth2/token

Headers:
Content-Type:application/x-www-form-urlencoded
Accept:application/json
Authorization:Basic BASE_64({YOUR_CLEINT_ID} :  {YOUR_CLIENT_SECRET})

Body:
grant_type: authorization_code
code: {code}​



Sample Response
Code Response

{
    "code": "AAL5SefZ2N-EzO4RH1W2lSIbjtwZrrkAvz2Gr_S8QdHfW1UfwhUBMNbmKIsC-Wf_7ok52xmaTOUQtwzP39JEBYGiSjxVHpGzfvoyJXrKqHaBHDBpZHkd5woOj7FcNIG8qV4"
}

Token Response

{
    "token_type": "bearer",

    "access_token": "AAIkMjU0YTE1M2MtYjJkZi00YmNiLWIyY2ItZWFmNzBhNjZiYmVkTHLZyKAUFC9UW83gsCC86xI-tjZ1P0lo6ZzXhSF8uI1sYXbystz3eI51v1kBOV3uxy6KMPa739tg9cej3tBfn07S690yDeSWca9w2BXy6vmg5gPiJ5lZ89gpBCgIt2UFY53nDiB8zAwTNeHhv0NzDg",

    "expires_in": 1095,

    "consented_on": 1565161605,

    "scope": "read:accounts all:remittance all:eft",

    "refresh_token": "AAJ2O3UIvM5T3EZBF1ASWfn2Ih9ddC4KQAJDiXDfk83JuyNUJILq0GQwdvLYMWhU8K8jFOxhhtfH82QShWcnStArDKiKxgOM1D_ugsgpuiAldKDmdtF5d2_nwlgOb6hVN9nHavYgj4Dl5CstfH5BYU06IJM8uy65m2oBMQbFEibjag",

    "refresh_token_expires_in": 2682000
}​