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

How send SMS ? #20

Open
nicorch opened this issue Apr 8, 2024 · 1 comment
Open

How send SMS ? #20

nicorch opened this issue Apr 8, 2024 · 1 comment

Comments

@nicorch
Copy link

nicorch commented Apr 8, 2024

The apiInstance.sendTransacSms does not exist on this package?

The documentation still redirects to depracted sib-api-v3-sdk . Are there guidelines for this?

Thx

@alexHerrmio
Copy link

Hey @nicorch stumbled across you issue. The wrapper is super messed up and I would recommend using the Rest
API that Brevo provided. However if you want to implement it with this API I can give you following example that worked for me using this npm package https://www.npmjs.com/package/@getbrevo/brevo.

import * as Brevo from '@getbrevo/brevo';

const apiInstance = new Brevo.TransactionalSMSApi();
apiInstance.setApiKey(Brevo.TransactionalSMSApiApiKeys.apiKey, '<your-api-key>');

const sendTransacSms = {
      unicodeEnabled: isUnicode,
      sender: 'Test sender',
      recipient: recipient,
      content: content,
    };

await apiInstance.sendTransacSms(sendTransacSms);

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

2 participants