I am getting an error when I try to create a Twilio Push Notification credential using Rest Api for my Subaccount in Twilio , Here is the response :
Twilio\Exceptions\RestException: [HTTP 400] Unable to create record: Cannot CREATE credentials record. 'Secret' must be present in file /home/forge/qc.cp.iocod.com/vendor/twilio/sdk/src/Twilio/Version.php on line 85
My code is
$sub_account = new TwilioClient('ACxxxxxxxxxxxxxxxxxx6f4', '7exxxxxxxxxxxxxxxxxxxx');
if( $sub_account)
{
$variable = $sub_account->notify->v1->credentials->create([
"type" => 'fcm',
"secret" => 'AxxxxI:APA91bG-WY6p9jNuTtgX5SohRF4VviARCjz68FIxvpTIeYUexxxxxxxxx',
]);
if( $variable)
{
echo $variable->sid;
}
}