Token Endpoint Consistently Returning 429 Status Code Even on New Accounts

Token Endpoint Consistently Returning 429 Status Code Even on New Accounts

I’m experiencing a persistent issue with the Aspose Cloud API token endpoint. When attempting to retrieve an access token, the endpoint consistently returns a 429 Too Many Requests status code, even when using credentials from a freshly created account.

  • Endpoint: The authentication url endpoint (https://api.aspose.cloud)
  • HTTP Method: POST
  • Error Code: 429 Too Many Requests
  • Reproduction Rate: 100% - occurs on every attempt

Hi, @Tarun_Kumar
Can you please provide more details on request and code to reproduce the issue? We will further proceed to assist you accordingly.

@Tarun_Kumar, please check documentation Rate Limits|Documentation

We are also getting a 429, it doesn’t matter where the request originates from or what API credentials we use. Example request:

curl --location ‘https://api.aspose.cloud/connect/token
–form ‘grant_type=“client_credentials”’
–form ‘client_id=“hidden”’
–form ‘client_secret=“hidden”’

We’re also facing the same issue, even when no client id and secret key are specified.

curl -X POST "https://api.aspose.cloud/connect/token" -o /dev/null -s -w "%{http_code}\n"

@a.user, When encountering authentication failures, increase the time between retry attempts. The cooldown period for rate-limited credentials is 10 minutes

We are seeing the same thing – persistent 429 even well after any cool-down period would have passed, and since we have not received any 400s there shouldn’t be any rate limiting regardless. You have an issue.

We are recording the same problem. Even if we change client_id and secret_key, the same error is shown

@kirill.novinskiy Can we get an acknowledgement this is an issue?

@kirill.novinskiy as mentioned before, it doesn’t matter where the request originates from or what API credentials we use. Like other users, even with completely new credentials we face the same issue.

@a.user , @lumentric
Can you please share code sample to reproduce the issue? We will further proceed to assist you accordingly. Please check that you are reusing the authentication token correctly.

@a.user
Please, try this code sample:

curl -v --location 'https://api.aspose.cloud/connect/token' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data-urlencode 'grant_type=client_credentials' \
     --data-urlencode 'client_id=YOUR_CLIENT_ID' \
     --data-urlencode 'client_secret=YOUR_CLIENT_SECRET'

we are also encountering this error today (2025-03-10).

we’re using the PHP SDK. our API usage indicates the last request we had that worked was 2025-03-04

I can create a token adding this header to the request. Is this new? Did the API recently change? We haven’t made any changes in the code in a long time and we suddenly got 429 errors since March 7

@blueburro
what version of php sdk are you using?

Unfortunately we are currently facing the exact same issue, and started receiving “429 Too Many Requests” for 4 days, nothing changed from our side, tried creating new credentials but issue persists.
API: https://api.aspose.cloud
package: aspose-cloud/aspose-words-cloud@21.5.0

Please share how you get tokens. Do you use SDK or your code to reach API?

we are using this package aspose-cloud/aspose-words-cloud - Packagist, It was working fine until four days ago, but now it always returns a “429 Too Many Requests” error.
we get this error: Client error: POST https://api.aspose.cloud/connect/token resulted in a 429 Too Many Requests
btw we tried to upgrade the package to “23.11.0” but still same issue, so it is not an SDK issue, all our requests are blocked because of this error

Please share how you use SDK code, as I couldn’t reproduce this. By the way, the current version of SDK is 25.2, so your version 21.5 is outdated.

We are planning do update the version but that not the issue right now, the issue is that the connect/token endpoints fails, here is a sample of our code, but I don’t think there is any problem with the code since it has been working fine for months!

public function handle(Contract|Offer|Vehicle $entity, Template $documentTemplate, ?int $customerId = null, array $pMergedData): string|null
    {

        $this->api = new WordsApi($this->config['sid'], $this->config['key']);
        $remoteFileName = self::$remoteFile . '.docx';
        $dirPath = $this->createDir((string)$entity->id);
        $template_file = $documentTemplate->document_path;
        FilesUtility::checkFileExists($template_file);
        $local_temp_file_name = Str::snake($documentTemplate->name) . '_' . time();
        Storage::disk('local')->put($local_temp_file_name, Storage::get($template_file));
        $localDocumentFile = Storage::disk('local')->path($local_temp_file_name);
        $upload_request = new UploadFileRequest($localDocumentFile, $dirPath . '/' . $remoteFileName);
        $this->api->uploadFile($upload_request);
        $xmlData = ArrayToXml::convert($pMergedData);
        $xmlData = str_replace("<?xml version=\"1.0\"?>", "", $xmlData);
        $fileName = ($objectTypeName ?? self::$mergedFile);
        $this->mergeDocument($dirPath, $remoteFileName, $xmlData, $fileName . '.docx');

        $pdfFileName = $this->saveFileAsPdf($fileName . '.docx', $dirPath);
        $asposeFilePath = $dirPath . '/' . $pdfFileName;

        $fileStream = $this->downloadMergedDocument($asposeFilePath);
        $savedFilePath = $this->uploadFileToCloud($entity->id, $fileStream, $fileName . '.pdf', $customerId);
        $this->deleteFolder($dirPath);
        Storage::disk('local')->delete($local_temp_file_name);
        return $savedFilePath;
    }
1 Like