cashfree / cashfree-sdk-nodejs

Cashfree SDK for Node js
MIT License
8 stars 21 forks source link

TypeError: Cannot read property 'token' of undefined #32

Open GoShikhar opened 3 years ago

GoShikhar commented 3 years ago

Error thrown by SDK: TypeError: Cannot read property 'token' of undefined\n at Auth.authorize "IP not whitelisted"

ENV: TEST I'm using dynamic IP for API calls, so instead of IP whitelisting, I'm using a public key.

Also, as a side note, I haven't added any IP in the whitelisting field on the test dashboard.

surinder-antech commented 2 years ago

Hi GoShikhar,

We are facing exactly same issue with Cashfree Payout apis. We are using nodejs library. Its working if we whitelist server IP address under 2FA settings.

But our code is running inside ECS, so the public IP of each service get updated upon restart. When we pass ".pem" file content directly into the environment file, then we get error: TypeError: Cannot read property 'token' of undefined

Could you please assign if you fixed this issue.

Thanks in advance.

Surya-16 commented 1 year ago

Hey,

On Cashfree Dashboard try switching the 2FA method to Public Key and check if that resolves your issue :)