question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi,

I just upgraded from 0.0.2 to 0.0.9 so that I can use the sandbox.

When I instrument my app using my production API account + key, it works great:

c2-dev-6 { username: 'ABC',
c2-dev-6   apiKey: 'XXX',
c2-dev-6   format: 'json',
c2-dev-6   sandbox: 'false' }

But when I instrument my app using my sandbox API account + key, I get 401 when I send a message:

c2-dev-7 { username: 'ABC',
c2-dev-7   apiKey: 'YYY',
c2-dev-7   format: 'json',
c2-dev-7   sandbox: true }

Any thoughts? I’ve tried passing true as both as a string and boolean.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
calvinkarunducommented, Sep 18, 2017

When developing on the sandbox environment, please use sandbox as the application username. We switched to this pattern about a month ago. The authentication params become username: "sandbox" and in your header object apikey: "your-sandbox-api-key".

I should also mention that whenever you update your apikey, the new key doesn’t take effect immediately, instead, it will take effect in 5 minutes or less.

0reactions
inacalicommented, Sep 17, 2017

@calvinkarundu am facing similar issue can you advice which module is causing this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

401 Not Authorized error: Sandbox Access Attempt
Are you receiving a 401 Not Authorized error when trying to access the sandbox? TaxJar's sandbox environment is available to Professional ...
Read more >
I am getting the error code 401 in the response. How do I ...
Ensure that the API is enabled for sandbox environment. · Ensure that you are using the merchant token listed in the "My Merchants"...
Read more >
401 Unauthorized responses on sandbox - PayPal Community
I am testing with credit card transactions and consistently getting a 401 Unauthorized response. For example: POST https://www.sandbox.paypal.
Read more >
401 Unauthorized - Clover Developer Docs
This article discusses ways to troubleshoot a 401 (unauthorized) error. Use the right environment. Sandbox and production are separate environments. Make sure ...
Read more >
Paypal sandbox post error 401 (Unauthorized) - Stack Overflow
The v1/payment-experience/web-profiles API requires a valid ClientId and a Secret for authentication. Share.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found