You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that the param required by the backend API is called 'friendly_name'. So we would expect both the input payload array as well as jsonSerialize function to use the same name. So, moving forward, you should be able to use the following code for using the API:
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);
$twilio->content->v1->contents->create(
ContentModels::createContentCreateRequest(
[
'friendly_name' => 'my_template_friendly_name',
'language' => 'en',
'types' => [
'twilio/text' => [
'body' => 'this is a example body',
],
],
]
)
);
Issue Summary
It is not possible to create a Template with friendly name using PHP library version 8.3.4
Steps to Reproduce
friendly_name not provided
appears as a nameTechnical details:
Hints
I think that the problem is in
ContentCreateRequest
file because the serialization is with camelCase instead snake_caseproblem
solution
The text was updated successfully, but these errors were encountered: