com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Generating the Access Token

WSO2 IoT Server APIs are protected through OAuth. Therefore, you need to generate an OAuth token to invoke the APIs. The authorization and access controls are controlled through the API scopes. Follow the steps given below to obtain the access token and renew it one's it expires.

Obtaining the access token

You can obtain an access token by providing the resource owner's username and password as an authorization grant. It requires the base64 encoded string of the consumer-key:consumer-secret combination. Let's take a look at how it's done.

  1. Encode the client credentials as follows:

  2. Generate the Client ID and the Secret ID.

  3. Encode the client credentials as follows:

  4. Generate the access token using the following command:

    The access token you generated expires in an hour. After it expires you can generate a new access token using the refresh token as shown below.


Generating a new access token from the refresh token

The access token expires in an hour. Let's look at how to use the refresh token to generate a new access token using the cURL command given below.

What's next?

Try out the WSO2 IoT Server's device management APIs.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.