py5paisa icon indicating copy to clipboard operation
py5paisa copied to clipboard

Updated Authentication Method

Open ghost opened this issue 2 years ago • 6 comments

  • 5paisa Python SDK version:
  • Python version:
  • Operating System:

Description

  • 5paisa Python SDK version:latest

Description

In updated readme, authentication section asks to get an access token from https://dev-openapi.5paisa.com/WebVendorLogin/VLogin/Index?VendorKey=Your Vendor Key&ResponseURL=Redirect URL

What values should filled as "Your Vendor Key" and "Redirect URL" in above link for standalone local development. Please elaborate this in readme.

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

ghost avatar Sep 13 '22 09:09 ghost

Hi, I am having an issue with getting the response token after the above step. at first, I got authorize option but it failed then I am getting just a login widow which is not letting me log in even after putting in the correct credentials.

Please help error

Anasuya-pautra avatar Oct 07 '22 14:10 Anasuya-pautra

I am getting same issue

srathsail avatar Oct 23 '22 11:10 srathsail

Vendor key is same as User key which you used for login before. Redirect URL can be https://www.google.com/

https://dev-openapi.5paisa.com/WebVendorLogin/VLogin/Index?VendorKey=XXXXXXXXXXXXX&ResponseURL=https://www.google.com/

replace XXXXXXXXXXXXX with your User/Vendor key and enter this in any browser and you should get the RequestToken

sample of Request Token https://www.google.com/?RequestToken=eyJhbGcidfgdzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdsdgmFtZSI6IjUyODA4dfM0Iiwicm9sZSI6IlFPNsdhdfggoMThuQ2RDT2RrVXltTdsfdf1c4WFFoIiwibmdfghdoxNjY2NjY4MTUwLCJleHAsdfgdNjgxODdfhdfCI6MTY2NjY2ODE1MH0.GNvorsi_o9JsEbz7dhfdssfB13HaLf2Fkuux99Wsdf&state=

qalpesh avatar Oct 25 '22 03:10 qalpesh

I think you also have to be logged into 5paisa account through the browser. Also the token expires within the next 30 seconds, this defeats the purpose of automatic order placement, in my opinion.

avishek15 avatar Nov 01 '22 14:11 avishek15

Thanks. I am now able to log in. I am also able to place order from Python program. I need some more time to familiarize with the functions. For example, I need to know Script Code of different equity.

Thanks, With regards, S. Rath

On Tue, Nov 1, 2022 at 8:29 PM Avishek Majumder @.***> wrote:

I think you also have to be logged into 5paisa account through the browser. Also the token expires within the next 30 seconds, this defeats the purpose of automatic order placement, in my opinion.

— Reply to this email directly, view it on GitHub https://github.com/5paisa/py5paisa/issues/212#issuecomment-1298633094, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGYFMQODLOYTJUC2XU5SJ23WGEV3LANCNFSM6AAAAAAQLH7NKQ . You are receiving this because you commented.Message ID: @.***>

--

Dr. Sushant Rath General Manager (Flat Rolling & Tribology) R&D Centre for Iron & Steel (RDCIS) Steel Authority of India Limited (SAIL) Ispat Bhawan, Ranchi-834002 Jharkhand, India Mobile: 8986880111 callto:8986880111, @.***

Former Member (NC), Computer Society of India

srathsail avatar Nov 01 '22 15:11 srathsail

Thanks. I am now able to log in. I am also able to place order from Python program. I need some more time to familiarize with the functions. For example, I need to know Script Code of different equity.

Thanks, With regards, S. Rath

On Tue, Oct 25, 2022 at 9:03 AM qalpesh @.***> wrote:

Vendor key is same as User key which you used for login before. Redirect URL can be https://www.google.com/

https://dev-openapi.5paisa.com/WebVendorLogin/VLogin/Index?VendorKey=XXXXXXXXXXXXX&ResponseURL=https://www.google.com/

replace XXXXXXXXXXXXX with your User/Vendor key and enter this in any browser and you should get the RequestToken

sample of Request Token

https://www.google.com/?RequestToken=eyJhbGcidfgdzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdsdgmFtZSI6IjUyODA4dfM0Iiwicm9sZSI6IlFPNsdhdfggoMThuQ2RDT2RrVXltTdsfdf1c4WFFoIiwibmdfghdoxNjY2NjY4MTUwLCJleHAsdfgdNjgxODdfhdfCI6MTY2NjY2ODE1MH0.GNvorsi_o9JsEbz7dhfdssfB13HaLf2Fkuux99Wsdf&state=

— Reply to this email directly, view it on GitHub https://github.com/5paisa/py5paisa/issues/212#issuecomment-1289930697, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGYFMQJEAH2U6AR5DZHQKPLWE5IJHANCNFSM6AAAAAAQLH7NKQ . You are receiving this because you commented.Message ID: @.***>

--

Dr. Sushant Rath General Manager (Flat Rolling & Tribology) R&D Centre for Iron & Steel (RDCIS) Steel Authority of India Limited (SAIL) Ispat Bhawan, Ranchi-834002 Jharkhand, India Mobile: 8986880111 callto:8986880111, @.***

Former Member (NC), Computer Society of India

srathsail avatar Nov 01 '22 15:11 srathsail