dev:app_store_example_with_postman
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:app_store_example_with_postman [2016/08/11 14:30] – su | dev:app_store_example_with_postman [2020/12/03 09:32] (current) – su | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== App Store Example using Postman ====== | ====== App Store Example using Postman ====== | ||
- | In this example, we'll use Postman | + | In this example, we'll use Postman |
- | //Postman is an Web API testing tool that runs on top of Google Chrome. It can be downloaded for free and provides a practical example of an external app interacting with the Industrial App Store. | + | //Postman is an Web %%API%% testing tool that runs on top of Google Chrome. It can be downloaded for free and provides a practical example of an external app interacting with the Industrial App Store. |
// | // | ||
Download and install Postman to get started: [[https:// | Download and install Postman to get started: [[https:// | ||
+ | |||
=== App Store Authentication and API Call Example === | === App Store Authentication and API Call Example === | ||
- | In our example we'll request the App Store API method: | + | In our example we' |
- | This returns info about the logged-in user. | + | //This returns info about the logged-in user.// |
- | {{ : | + | {{ : |
If you attempt to execute this directly, you will receive an unauthorized error like the following: | If you attempt to execute this directly, you will receive an unauthorized error like the following: | ||
Line 25: | Line 26: | ||
</ | </ | ||
- | This is because the App Store API is secured using OAuth2. | + | This is because the App Store %%API%% is secured using OAuth2. |
- | To prepare an authorization request, select | + | To prepare an authorization request, select: **Authorization |
- | {{ :dev:postman02.png? | + | Specify "add authorization data to request headers" |
+ | |||
+ | {{ :dev:postman01b.png? | ||
+ | |||
+ | Then click **Get New Access Token**. | ||
You will be prompted for the following Authorization parameters: | You will be prompted for the following Authorization parameters: | ||
- | Auth URL https:// | + | {{ : |
- | Access Token URL https:// | + | |
- | Client ID [We'll give you this if you ask] | + | ^ Grant Type | Authorization Code | |
- | Client Secret [We'll give you this if you ask] | + | ^ Call Back %%URL%% | %%https:// |
- | Scope UserInfo | + | ^ Auth %%URL%% | %%https:// |
- | Grant Type Authorization Code | + | ^ Access Token %%URL%% | %%https:// |
+ | ^ Client | ||
+ | ^ Client Secret | ||
+ | ^ Scope | %%UserInfo%% | | ||
+ | ^ Client Authentication| Send as Basic Auth header | | ||
+ | |||
+ | |||
+ | This returns an Access Token. | ||
- | This returns the Access Token. | + | {{ : |
- | {{ : | + | Select "Use Token", |
- | Select "Use Token", | + | {{ : |
- | {{ : | ||
=== Summary === | === Summary === | ||
- | In the above example we used Postman to simulate an external app interacting with the App Store. Postman has been registered with App Store, and thus has been granted | + | In the above example we used Postman to simulate an external app interacting with the App Store. Postman has been registered |
- | To register an App, see [] for more info. | + | For more info, see **[[Dev: |
- | Postman exposes the parameters required to make an OAuth2 authorization request. Your application | + | Postman exposes the parameters required to make an OAuth2 authorization request. Your application |
- | Finally, we used App Store as a means of authenticating users and presenting user-information. However, there is an extensive API available, including user-account debiting and real-time process data interrogation. | + | Finally, we used App Store as a means of authenticating users and presenting user-information. However, there is an extensive |
dev/app_store_example_with_postman.1470925830.txt.gz · Last modified: 2016/08/11 14:30 by su