Authentication

This API will make sure you execute your transactions in a safe and controlled environment.

generateToken

GET

Generate Token

 

 

Description

 

We take security very seriously. This API will make sure you execute your transactions in a safe and controlled environment. We are using the OAuth2 security mechanism. The first step you need to do is to ask for a client token. The user will be redirected to the JS bank’s login, and after a successful login will be asked to grant the client for the requested scopes. After that the OAuth2 server redirects to the redirect URL.

 

 

Version


V1


Resource URL

https://sandbox.jsbl.com/oauth/v1 /generate


Request Header


Name Type Values Description Length

Authorization

Authorization Basic ClientID and Client Secret are credentials of an APP created by any user on Apigee Platform. These credentials will be passed in as Authorization Header as base64 encoded string with Basic keyword and a space before it. Base 64 encoding online: https://www.base64encode.org/ NA


SAMPLE RESPONSE:


SUCCESS

{
"access_token": "Pcf57A57ikpYtvzXN0I28xpRc0am",
&expires_in": "3599",
}

FAILURE

{
"requestId": "3091741323772",
"errorCode": "02",
"errorMessage": "Bad Request - Invalid TotalAmount"
}


Try-out Yourself

Query Parameters


Name Values Description
grant_type
(required)

Only client_credentials grant type is supported.


Set Authentication

OAuth 2.0

API Key

Clear Request

Make a request and see the response.

Make a request and see the response.

Make a request and see the response.

Response Code Details


{
"Token" : "T5GgnicBKBdJ5pEHHG886JIGHkqUbV" ,
"expires_in" : "3599"
}

{
"requestId": "3091741309081",
"errorCode": "01",
"errorMessage": "Bad Request - Invalid Authorization Header"
}



{
"requestId": "3091741309081",
"errorCode": "03",
"errorMessage": "Bad Request - Invalid Request Payload"
}



{
"requestId": "3091741309081",
"errorCode": "04",
"errorMessage": "Bad Request - Resource not found"
}



{
"requestId": "3091741309081",
"errorCode": "05",
"errorMessage": "Bad Request - Invalid Access Token"
}


{
"requestId" : "0b1d3serewdffrt877sd8d7f8sdf78" ,
"errorCode" : "03" ,
"errorMessage" : "Failed to get OAuth Token. Please contact support."
}

FAQs

You need to go through the section "How it Works".

Prerequisite(s)

Base64 encoded App credentials passed as Basic Authentication header

Resource Summary

Security

Authentication

Category

OAuth2 Token

Working...