Postman Tutorial: Disqus REST API #2

Postman: Disqus API Case Study (2) – OAuth 2.0 Authentication

Last time, we introduced how to use Postman to access public data from Disqus REST API. The example exercises illustrated a few ways to query the data of discussion threads using the GET method with a public API key. Since Disqus comments are public data, no user authentication is required for most read actions. So, how about post or update actions?

Absolutely, they are different. The API requests to write data must be authenticated. This time, we will learn how to get an OAuth access token for the Disqus REST API using Postman.

Postman: Disqus API Case Study (2) – OAuth 2.0 Authentication 1Postman: Disqus API Case Study (2) – OAuth 2.0 Authentication 2

Perform OAuth 2.0 authentication with Postman

  1. In the Postman request builder, click on the Authorization tab.
  2. Select OAuth 2.0 from the Type dropdown list.
Postman: Disqus API Case Study (2) – OAuth 2.0 Authentication 3
  1. Click on the Get New Access Token button on the right side to request an access token.
  2. For the Disqus REST API, enter the following in the dialog:
Postman: Disqus API Case Study (2) – OAuth 2.0 Authentication 4
FieldValue
Token Namee.g. Disqus API Token
The name you want to use for the token
Grant TypeAuthorization code / Implicit
Read Postman Docs
Callback URLhttps://<your-domain>/oauth_redirect
Redirect URI that points to a trusted domain listed in your application
Auth URLhttps://disqus.com/api/oauth/2.0/authorize/
Disqus authorize endpoint
Client ID{{api_key}}
Your Disqus API Public key
Client Secret{{api_secret}}
Your Disqus API Secret key
Scoperead,write
Please refer to Permissions and Scopes
Statecode
Temporary exchange parameter
  1. Click Request Token to continue. If this is the first time that you are requesting authorization, you will be prompted by Disqus to authorize access for your app by signing in your account.
Postman: Disqus API Case Study (2) – OAuth 2.0 Authentication 5
  1. If you successfully receive a token from the API, you will see its details, together with the expiry.
Postman: Disqus API Case Study (2) – OAuth 2.0 Authentication 6

Click Use Token to select the returned value.


Next time, we will apply the access token to send authenticated requests, like create, update, and remove a thread from your Disqus.

As of August 2020, there are no longer limits on the number of APIs you can create in Postman. Please see our plans and pricing page for details.

What does “Max # of APIs” mean in Postman? – Postman Blog | Postman Blog

Yes. Postman for Nonprofits program grants 10 free Postman Business plan licenses for eligible nonprofit organizations. You will need to provide legal documentation for the Postman team to identify you as a charitable, nonprofit, or nongovernmental organization in the country where you are located.

Note: This post includes affiliate links for which I may make a small commission at no extra cost to you when you make a purchase.


If you like this post, please share it with your Facebook and Twitter. You might also support me by donating via Ko-fi.

Scroll to Top