We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 234334e commit 54357b6Copy full SHA for 54357b6
examples/vanilla_php.php
@@ -8,7 +8,8 @@
8
curl_setopt($curl, CURLOPT_BINARYTRANSFER, true);
9
curl_setopt($curl, CURLOPT_POST, true);
10
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/octet-stream'));
11
- curl_setopt($curl, CURLOPT_URL, "https://v2.convertapi.com/convert/docx/to/pdf?secret=".$secret);
+ curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Bearer '.$secret));
12
+ curl_setopt($curl, CURLOPT_URL, "https://v2.convertapi.com/convert/docx/to/pdf");
13
curl_setopt($curl, CURLOPT_POSTFIELDS, array('file' => new CurlFile($file_path)), 'storefile' => 'false');
14
$result = curl_exec($curl);
15
if (curl_getinfo($curl, CURLINFO_HTTP_CODE) == 200) {
0 commit comments