Connecting Studio OAuth via Postman

emily_allen
Community Team
Community Team
6
6101

This article details how to connect to Studio's OAuth implementation through Postman, an application that simplifies API development. Before starting any of the steps in this article, please verify you have downloaded and installed Postman and that you have access to a Studio account that can generate an OAuth Client ID and secret. For more information about the Studio API, see the Studio Public API documentation.

 

Open Studio Settings

Open Studio Settings

In Studio, click the Navigation Menu icon [1], and then click the Studio Settings link [2].

 

Open Developer Keys

Open Developer Keys and Add New Key

Open the Developer Keys tab, and click the Add New Developer Key button.

 

Enter Key Details

Save Key

Enter a name [1] and redirect URI [2], then click the Save Key button [3]. The redirect URI is your institution's Studio URL (eg., domain.instructuremedia.com).

 

View New Key

View New Key

After you have created your developer key, you will see the Client ID and Secret.

 

Add New Authorization

Add New Authorization

In Postman, click the Plus tab [1] to add a new request and then click the Authorization tab [2].

 

Get New Access Token

Get New Access Token

In the Type drop-down menu [1], select the OAuth 2.0 option [2]. Then click the Get New Access Token button [3].

 

Enter Token Details

Enter Token Details

In the New Access Token modal, enter the following information for your token:

  • Grant Type [1]: select Authorization Code
  • Callback URL [2]: enter one of the redirectURI URLs entered in Studio
  • Auth URL [3]: enter <your studio domain>/api/public/oauth/authorize
  • Access Token URL [4]: enter <your studio domain>/api/public/oauth/token
  • Client ID [5]: enter the developer key generated in Studio
  • Client Secret [6]: enter the secret generated in Studio

 

When you have entered all the information, click the Request Token button [7].

 

A window will display asking you to enter your Studio credentials and authorize the Oauth application. Click the Authorize button.

 

Use Token

Use Token

Click the Use Token button. You will now be able to make requests using this token.

To test the integration, enter <your studio domain>/api/public/v1/ping to the request URL. You should get a 200 response code.

For all available requests, check the Studio Public API Documentation.

 

View New Integration in Studio

View New Integration in Studio

In Studio, open the Integrations tab [1]. Your new integration will display in the list of integrations [2].

Tags (2)
6 Comments
joshmckibbin
Community Member

Thanks for this. I was able to generate an Access Token.

However, I am still getting a 401 error whenever I try to use Postman to make a Post request to create new Media.

Any additional info would be greatly appreciated.

EDIT: I was able to get this to work. I had the wrong API URL.

mathematical
Community Member

Nevermind, typo!

Thanks!

nbenoit
Community Novice

Is there any sort of client credentials grant supported? It is described further in these general oauth docs: https://oauth.net/2/grant-types/client-credentials/

Jturps29
Community Member

Thanks for making these instructions. I do keep running into an "authorization error" every time I click authorize after logging into canvas with my credentials. 

Postman gives me this error; "Error: invalid_client, Description: Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."  when I look at the console I found a "401 Unauthorized status." Am I missing some sort of permission for my account in canvas?

Anyone have thoughts, ideas?

 
 
dineshkumar_tha
Community Explorer

Is there any way to integrate Canvas Studio into different third party applications using LTI 1.3 configuration?

dbrace
Community Contributor

@emily_allen, have these directions changed at all? If so, how?  I am asking because they are almost 4 years old.

Also, how do these directions relate the use of https://<<instance>>.instructuremedia.com/api/public/docs?