-
Open your API Portal in a new browser tab and log in with your developer account.
If you closed the tab from earlier and don’t have it bookmarked, you can follow these steps to find your API Portal URL:
-
Click on the
API Productstab. -
Notice that the old
inventoryproduct is no longer available. It has been replaced by your newThink Inventoryproduct. -
Click on the
Think Inventoryproduct.Note:
There is no need to re-subscribe your application! Using theReplacestate change control migrated your subscription for you, so you’re already entitled to the API’s contained in the new Product’s Default Plan - including theoauthAPI. -
Click on the
inventoryAPI from the palette menu on the left. -
Select the
GET /Itemsoperation. Notice that we now have an additional OAuth security requirement defined. -
Scroll down to browse the invocation form.
-
Select your subscribed application from the
Client IDdrop-down menu. -
Paste your secret into the
Client secretfield. -
In the
UsernameandPasswordfields, you can enter any text.Note:
Recall that when we configured the OAuth API, we provided an Authentication URL as the method for validating the user credentials. The URL that we provided will respond back OK with any credentials. -
Click on the
Authorizebutton to obtain an OAuth token.The API Portal will call out to the OAuth Token URL with your client credentials and user credentials.
The OAuth API which you built in lab 3 will intercept the request, validate the credentials, and generate a token.
-
Click on the
Call operationbutton to invoke the API. The request will include the OAuth bearer token in theAuthorizationheader. -
To prove that the token is being validated, you can either remove or modify the contents of the
Access Tokenfield, then click theCall operationbutton again and see the401 Unauthorizederror response.
Continue
Proceed to Lab 5 - Advanced API Assembly.