REST API curl php bearer auth token invalid error

My query refers to the cURL example on Convert PDF to Other File Formats|Documentation

I am trying to use the cURL for Aspose .PDF REST API to convert a PDF to HTML and download the HTML output as a ZIP file. Unfortunately, although I get the authentication token in the first step, I get a failure message when I try to use the token to access the conversion to HTML API.

The failure message is

{“Message”:“Authentication failed!”}

See the pdfs below showing the PHP code (code 2 doc.pdf) I use and its output (code 1 doc.pdf)

code 1 doc.pdf (412.2 KB)

code 2 doc.pdf (226.0 KB)

Can someone please help me with this issue?

Thanks,
Pratyush

This topic has been moved to the related forum: PDF to HTML REST API conversion via cURL - Free Support Forum - aspose.cloud