Skip to main content

Accessing Response Data

You can access the data from the last API response on any object via getLastResponse().

SSL / TLS Compatibility issues

Telnyx’s API now requires that all connections use TLS 1.2. Some systems (most notably some older CentOS and RHEL versions) are capable of using TLS 1.2 but will use TLS 1.0 or 1.1 by default. The recommended course of action is to upgrade your cURL and OpenSSL packages so that TLS 1.2 is used by default, but if that is not possible, you might be able to solve the issue by setting the CURLOPT_SSLVERSION option to either CURL_SSLVERSION_TLSv1 or CURL_SSLVERSION_TLSv1_2:

SSL / TLS Configuration Option

See the “SSL / TLS compatibility issues” paragraph above for full context. If you want to ensure that your plugin can be used on all systems, you should add a configuration option to let your users choose between different values for CURLOPT_SSLVERSION: none (default), CURL_SSLVERSION_TLSv1 and CURL_SSLVERSION_TLSv1_2.

Development

Unit tests rely on a mock server so all unit tests are ran through docker. To run all unit tests execute:
Running unit tests with code coverage requires you build the docker container with XDEBUG=1
then run the unit tests as

Plugin Developers

Are you writing a plugin that integrates Telnyx and embeds our library? Then please use the setAppInfo function to identify your plugin. For example:
The method should be called once before any request is sent to the API. The second and third parameters are optional.