Hi,
I am currently making requests:
curl -X PUT 'https://api.aspose.cloud/v3.0/3d/storage/file/filename.usdz' \
-H 'Authorization: Bearer 03AFcWeA4tG90OrPguOJs... \
-H 'Content-Type: multipart/form-data' \
-T "/path-to-file/filename.usdz"
curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)
{"RequestId":"a5d9767a6d33facea624b921ef68f56d","Error":{"Code":"error","Message":"ClientId is undefined. Please check authorization.","Description":"Operation Failed. General Error.","DateTime":"2024-07-24T12:41:49.2664825Z","InnerError":null}}
And am getting ClientId is undefined error messages.
I am creating the bearer token successfully using my client_id
and client_secret
though, using
$token = null;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.aspose.cloud/connect/token');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "grant_type=client_credentials&client_id=" . $this->clientCredential['client_id'] . "&client_secret=" . $this->clientCredential['client_secret']);
$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
$headers[] = 'Accept: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
Any ideas what the issue could be? My understanding is, once you have the Bearer
token, you won’t need the client id anymore, right? At least that’s what I read from here? Authenticating API Requests|Documentation