Authentication

Summary

The Aspose.HTML Cloud APIs are secure and require JWT authentication. Authentication is the process of verifying the user’s Credentials. Based on the Credentials (Client Id and Client Secret), you receive a JWT token and can send requests to Aspose Cloud APIs.

This article explains how to obtain an authentication token and apply it for REST API calls.

Use of Credentials and Service URLs

There are two ways to authorize Aspose.HTML Cloud REST API calls provided by SDK for .NET: by user Credentials or by externally provided access token.

The Client Credentials (Client Id and Client Secret) you can use to invoke Aspose Cloud APIs.

If you don’t already have the Credentials, to get the Client Secret and Client Id, open the Aspose.Cloud Dashboard and perform the following steps:

  1. Create your Aspose Cloud Account (if not already created).
  2. Create a new Application.
  3. Get the Credentials (Client id and Client secret ) for your Application.
  4. Now, you are ready to call Aspose REST APIs.

More detailed information about the Credentials obtaining you find in Create an Account and Get Credentials and Dashboard articles.

REST API

The Credentials (Client Id and Client Secret) are used when applications request a JWT token to access their resources.

Let’s consider an example of how to obtain a JWT token using a cURL request:

Step 1. Get a JWT token

You can obtain an access token by sending a POST request to the token endpoint ( https://api.aspose.cloud/connect/token ) and proving your request using Client Credentials authorization.