Vonage / vonage-node-sdk

Vonage API client for Node.js. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Apache License 2.0
375 stars 178 forks source link

401 Error when sending Whats App message #819

Closed manchuck closed 7 months ago

manchuck commented 1 year ago

When trying to send a WhatsApp Message, the authorization header does not appear to be sent.

Expected Behavior

The message should be sent with the correct authorization headers and the response should pass

Current Behavior

The authorization header being sent is causing a 401 response.

Steps to Reproduce (for bugs)

    const res = await vonage.messages.send(new WhatsAppText({
        from: from,
        to: to,
        text: message,
      })
    );

Context

Your Environment

dirk789 commented 1 year ago

I’m also experiencing it with SDK version 3.4.0 and Node 18 on MacOS. Is there any update or workaround on this?

manchuck commented 1 year ago

@dirk789 can you send over some example code? I found that It might just be a simple configuration issue

SirPhemmiey commented 1 year ago

I am using version 3.4.0, but i can't see WhatsApp usage. Any heads up on that, please?

manchuck commented 1 year ago

@SirPhemmiey: Did you get a whats app business account from the Vonage Dashboard? You can find more information here: https://developer.vonage.com/en/messages/concepts/whatsapp

manchuck commented 9 months ago

Closing this issue as no new information was given, and the issue cannot be reproduced. Please open a new issue with example code if you continue to have an issue