Doc Fundamentals
Funds Management
Order Management
Portfolio Management
User Authentication
OAuth Login (Web Based)
Daily API Calls
Success Rate
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.
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
Parameters | Discription |
---|---|
ResponseURL | The callback URL where partner wants to redirect customer after |
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. |
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.
PARAMETERS | DESCRIPTION |
---|---|
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.