Issue
Developers often need to map Twilio REST API endpoints to a specific Twilio Helper Library (SDK), such as NodeJS, Python, Java, C#, Ruby, or Go. However, the SDKs do not always provide a 1:1 mapping for every REST API endpoint or feature. This can make it difficult to determine whether a feature is unsupported by a specific SDK or simply hard to find in the documentation.
Product
REST API and TwiML
Environment
Twilio Console
Cause
The Twilio Helper Libraries are designed to cover most REST API functionality, but not all endpoints or features are mapped directly in every language. Some advanced or newly released API features may require direct REST calls using the SDK’s generic request methods or a standard HTTP client.
Resolution
When trying to use a Twilio REST API endpoint, follow these steps to determine the best method for accessing it:
-
Check the Twilio REST API Definition:
Consult the relevant Twilio API documentation to see all available endpoints, features, and their expected parameters. This confirms the feature is available in the API.
-
Validate Support in the Specific SDK:
Review the reference documentation for the SDK you are using (e.g., NodeJS, Python, Java, C#, Ruby, Go) for dedicated methods and parameters that match the endpoint.
-
Accessing the Endpoint if Support is Not Explicit - Use a Third-Party HTTP Client:
If the generic method is insufficient or unavailable, you can use a standard third-party HTTP client in your language (e.g., requests in Python, fetch in JavaScript) to access the endpoint directly.
-
Review the SDK Changelog and Known Issues:
The SDK's GitHub releases page or documentation often provides a changelog with version history, new features, bug fixes, and a “Known Issues” section highlighting unsupported or deprecated features.
-
Check Regional Product Availability:
Some features or APIs may not be supported in certain Twilio regions. Refer to the Regional Product and Feature Availability page for details.
-
If Still Uncertain, Ask for Help:
If you cannot determine whether a feature is missing or just hard to find, reach out to Twilio Support with the specific endpoint or feature in question.