Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

random 401 invalid_credentials errors #435

Open
ghostlexly opened this issue Feb 21, 2025 · 0 comments
Open

random 401 invalid_credentials errors #435

ghostlexly opened this issue Feb 21, 2025 · 0 comments

Comments

@ghostlexly
Copy link

ghostlexly commented Feb 21, 2025

Hello,

We are getting randomly, at random moments, this error :

We are using mangopay2 nodejs sdk (1.49.0)

Request failed with status code 401 {
  Message: 'The authorization credentials are not valid',
  Type: 'invalid_credentials',
   Date: 1740147932
 }

Example of actions which on this problem happens:
Create wallet, get payin from id

Example of code:

class ExampleController {
   private readonly mangopayClient = new mangopay({
      clientId: configService.getOrThrow("API_MANGOPAY_CLIENT_ID"),
      clientApiKey: configService.getOrThrow("API_MANGOPAY_CLIENT_API_KEY"),
      baseUrl: configService.getOrThrow("API_MANGOPAY_BASE_URL"),
      apiVersion: "v2.01",
    });

   example = async () => {
       // Create mangopay wallet
      const mangopayWallet = await this.mangopayClient.Wallets.create({
        Owners: ["user_m_01JJRWD0B8KDKBSN2R1M0VZ9R2"],
        Description: "Example API",
        Currency: "EUR",
      });
   }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant