OAuth Login (Web Based)

POSTJSONPlugin
3320

Daily API Calls

100%

Success Rate

550ms

Avg. Response Time


The OAuth mechanism is built for customer login flow on partner’s platform built on 5paisa Open APIs. It redirects the customer to 5paisa Web Login page through partner’s platform (web or app) and let customer login through 5paisa demat account credentials. Post successful login, customer is redirected back to the callback URL provided by the partner.

REQUEST URL

https://dev-openapi.5paisa.com/WebVendorLogin/VLogin/Index?VendorKey=<Your Vendor Key>&ResponseURL=<Redirect URL>&State=<Pass reference value if needed>

NOTE

Partner has to redirect customer to the URL mentioned above and along with it pass parameters listed below through POST method.

This login has been updated as per the SEBI regulations of 2-factor authentication. It is based on client code, PIN and a real-time OTP/TOTP.

Parameters

ParametersDiscription

ResponseURL

The callback URL where partner wants to redirect customer after 
successful login through OAuth.

VendorKey

The API key of the partner provided by 5pasia along with other API credentials. Partner can use the key provided to them or User can use his own User Key.

State

This is the redirection params , which is passed to the response URL on successful login. 

SAMPLE OAUTH REDIRECTION  :

https://www.google.com/?RequestToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IjUwMDUyNzcwIiwicm9sZSI6IlluSjRKWXBkWndlQ09oWDJ6QVhlV2lPZzdFWndrVmQ0IiwibmJmIjoxNzE1MjQwODAyLCJleHAiOjE3MTUyNDA4MzIsImlhdCI6MTcxNTI0MDgwMn0.-CqCohv02yld8D-XbEF3SCFzWEpfQAVhjL-H-_evZSs&state=MAE

 

After successful login, user will be redirected to the callback URL provided by the partner/user and partner/user will receive following parameters as URL Params.

 

PARAMETERSDESCRIPTION

State Params

State Variables to be send on response URL as URI params.

RequestToken

Request Token which can be used to obtain access token. Valid for 60 min.

 

Fetch Access Token

 

The Request Token returned on successful login is valid for 60 min only. This token is to be used to call fetch Access token which can be used for sending request through all other Open APIs.

Please refer below documentation to know how to fetch access token.

Validity of Request Token

The request token  generated after successful login request remains valid for 60 min from the time of its generation. However the access token generated from above request token is valid for a day. Please refer next documentation to obtain access token.

On this Page

Knowledge base

Check API Integration Flow
API Integration Flow
How to use fetch Access Token
Access Token API

Contribute and get rewarded

Help make these Dev Docs great, contribute to the APIs and get rewarded for your contribution

Need Help

Ask Developer Community

Contact Support

 

Changelog

Changes made to our APIs - Changelog

AVENUES