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

ServiceInstance#usecase throws when providing known values during Messaging ServiceInstance creation #937

Open
TwinkieLover opened this issue Jun 11, 2023 · 0 comments

Comments

@TwinkieLover
Copy link

TwinkieLover commented Jun 11, 2023

Environment:

  • NPM - 8.5.5
  • Node - 16.14.2
  • Twilio Node - 4.11.2

There are 2 issues at play here.

  1. I am trying to create a new ServiceInstance for SMS following the Twilio Node client example here. This is the code fragment under review:
const res = await this._client.messaging.v1.services.create({
friendlyName: "someFriendlyName",
usecase: "marketing",
stickySender: true,
fallbackToLongCode: true
});

The "marketing" usecase value works. Removal of attribute usecase works. None of the other usecase values found in Twilio documentation work, i.e. "customer care", "2fa", "mixed", etc. Here is the thrown exception:

Usecase is invalid

122 |     const res = await this._client.messaging.v1.services.create(options);
    |                 ^

The specific lines (303 - 306) can be found in the type definition file at twilio/lib/rest/messaging/v1/service.d.ts.

  1. There is no Messaging ServiceInstance usecase GET covered in the API docs showing all supported values, although there is an affordance for US A2P Campaign usecase values here. Is this a disconnect or I was not able to discover the API doc? If so, please provide it.

Thank you!

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