py5paisa icon indicating copy to clipboard operation
py5paisa copied to clipboard

Invalid Response Token

Open Anasuya-pautra opened this issue 2 years ago • 6 comments

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

Description

I am just trying to get logged in using python but I am getting an invalid token response.

to get the token using

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

What I Did

from py5paisa import FivePaisaClient cred={ "APP_NAME":"xxx", "APP_SOURCE":"xxxx", "USER_ID":"xxxxx", "PASSWORD":"xxxxx", "USER_KEY":"xxxxx", "ENCRYPTION_KEY":"xxxxxxxxx" }

client = FivePaisaClient(cred=cred) client.get_access_token('your token')

as per instruction, I am using the generated request token within 30 sec but still getting invaild token response.

please help

Thanks

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

Yes!!, even I am getting the same

akheelsajjan avatar Oct 19 '22 02:10 akheelsajjan

I have the same problem

srathsail avatar Oct 23 '22 13:10 srathsail

I have the same problem

Selva780M avatar Oct 24 '22 14:10 Selva780M

client.login() function api working only 600 time per day ..

Selva780M avatar Oct 24 '22 14:10 Selva780M

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

qalpesh sir, again same problem show... Invaild Response.

from py5paisa import FivePaisaClient cred={ "APP_NAME":"xxx", "APP_SOURCE":"xxxx", "USER_ID":"xxxxx", "PASSWORD":"xxxxx", "USER_KEY":"xxxxx", "ENCRYPTION_KEY":"xxxxxxxxx" }

client = FivePaisaClient(cred=cred) client.get_access_token('https://www.google.com/?RequestToken=eyJhbGcidfgdzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdsdgmFtZSI6IjUyODA4dfM0Iiwicm9sZSI6IlFPNsdhdfggoMThuQ2RDT2RrVXltTdsfdf1c4WFFoIiwibmdfghdoxNjY2NjY4MTUwLCJleHAsdfgdNjgxODdfhdfCI6MTY2NjY2ODE1MH0.GNvorsi_o9JsEbz7dhfdssfB13HaLf2Fkuux99Wsdf&state=')

Pls help sir...

Selva780M avatar Oct 25 '22 08:10 Selva780M

Please let me knoew if any one did slove the above problem ?

sdkkadri avatar Jan 06 '23 09:01 sdkkadri

Hi guys just use the old login method one without the token. Its working now.

Anasuya-pautra avatar Jan 08 '23 20:01 Anasuya-pautra