Reputation: 1
I am trying to create the regulatory bundle for each end users, but I am facing the problem while submitting the required documents for the identity and address proof through Twilio sdk. either directly using the Twilio Api or sdk, the status is draft and also after assigning it to the bundle, the bundle it set to draft. when I manually check the bundle from the Twilio console, all the data are filled and are ok except the documents that I attached. They are not attached there
Can i get solution to properly attach the documents through the Twilio sdk or Api.
I have tried to attach the documents in these ways,
$fileStream = fopen($addressDocumentPath, 'r');
$response = Http::withBasicAuth($twilioClient->username, $twilioClient->password)
->asMultipart()
->attach('File', $fileStream, basename($addressDocumentPath),['Content-Type' => $mimeType])
->post('https://numbers-upload.twilio.com/v2/RegulatoryCompliance/SupportingDocuments', [
'Attributes' => $attributes,
'FriendlyName' => 'Address Proof of ' . $kyc->first_name,
'Type' => $kyc->address_document_type,
]);
fclose($fileStream);
and also using curl, but it is not working
Upvotes: 0
Views: 25