We are sorry for the inconvenience. We have reproduced the issue and logged a ticket WORDSCLOUD-1363 for further investigation and resolution. We will notify you as soon as it is resolved.
You can check the status from the following issues status window in this thread or can ask us for the update.
Can you please share how you are calling the MailMerge API, using Aspose.Words Cloud SDK for PHP? As we noticed that the issue is only happening with PHP SDK.
The issues you have found earlier (filed as WORDSCLOUD-1363) have been fixed in this update. This message was posted using Bugs notification tool by tilal.ahmad
We will appreciate it if you please check it again, it should be working now as expected. We were deploying the new version of Aspose.Words Cloud API, that caused the issue.
I have tested again with the latest PHP SDK 21.1 of Aspose.Words Cloud and unable to replicate the issue. We will appreciate it if you please upgrade to the latest SDK version of Aspose.Words Cloud SDK for PHP, it will resolve the issue at your end. We are truly sorry for the inconvenience caused.
Regarding the above, the error reported was: Client error: POST https://api.aspose.cloud/connect/token resulted in a 400 Bad Request response:
{“error”:“invalid_client”}
Note I upgraded to a paid account to see if this was the problem, still getting the same results.
I have tested the ExecuteMailMerge API method with my sample template and data, but have been unable to notice any issues. Please review the following sample code. If the issue persists, then please share your sample code along with your credentials via a private message. We will investigate the issue and guide you. For a private message, click on my user icon and use the message option for it.
<?php
require_once('D:\xampp\htdocs\aspose-words-cloud-php-master\vendor\autoload.php');
//TODO: Get your ClientID and ClientSecret at https://dashboard.aspose.cloud (free registration is required).
$ClientId="xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
$ClientSecret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$wordsApi = new Aspose\Words\WordsApi($ClientId,$ClientSecret);
try {
$templateName = "template.docx";
$outputName = "ExecuteMailMerge_output.docx";
$remoteFolder="Temp";
#read mailmerge data
$data = file_get_contents("data_file.xml");
$fieldOptions= new Aspose\Words\Model\FieldOptions([
'field_update_culture_name'=>'de-DE', 'field_update_culture_source'=>Aspose\Words\Model\FieldOptions::FIELD_UPDATE_CULTURE_SOURCE_FIELD_CODE]);
##upload template file to storage
$uploadRequest = new Aspose\Words\Model\Requests\UploadFileRequest($templateName,$remoteFolder."/".$templateName,null);
$wordsApi->uploadFile($uploadRequest);
##Execute MailMerge
$request = new Aspose\Words\Model\Requests\ExecuteMailMergeRequest($templateName, $data,$fieldOptions, $remoteFolder,NULL,NULL,NULL,NULL,false,NULL,NULL,NULL, $remoteFolder."/".$outputName);
$result = $wordsApi->executeMailMerge($request);
##Download file
$request = new Aspose\Words\Model\Requests\DownloadFileRequest($remoteFolder."/".$outputName,NULL,NULL);
$result = $wordsApi->downloadFile($request);
copy($result->getPathName(),"MailMerge_output.docx");
print_r($result);
} catch (Exception $e) {
echo "Something went wrong: ", $e->getMessage(), "\n";
PHP_EOL;
}
?>
Hello and thanks for the reply. I appreciate the sample code, but it does not appear it’s even getting past the new WordsApi() call - it is failing with “invalid client” in the response message.
I posted my creds in a message to you by clicking on your user icon, but it appeared to show in the public thread, so I removed them. Please advise on how to send them to you in a DM