The SampleService Smart API and sample Smart API Manager instance are currently unavailable. The SampleService Smart API and the sample Smart API Manager instance referenced in this documentation, and previously deployed on the sam.spclouddave.com server, are no longer available. We plan to replace them after the Smart API Manager 6.0 release. |
|
As a Smart Client developer, you must learn the concept of authorization, getting an access token to call a secured API resource.
Postman (a Chrome extension) is useful for learning this concept. You can use Postman to request an access token for the SampleService Smart API. Subsequently, you can pass the access token to call a secured resource for the Smart API.
Install and start Postman
-
Install Postman from the Chrome Web Store.
-
In Chrome, go to the Apps tab (chrome://apps) and start Postman.
Use Postman to get an access token
-
Select the POST HTTP method and enter the following URL:
https://sam.spclouddave.com/sam/oauth/connect/token
-
Click the Body tab below the URL address.
-
Select the x-www-form-urlencoded content type.
-
Complete the form request by providing the following key/value pairs:
Key
Value
grant_type
password
username
sampleuser
password
SampleUser.2017
client_id
F533EE14-A81B-4807-8E10-C816A9FEF801
client_secret
SampleUser.2017
scope
276B9DC8-7983-4A50-948B-B04D29244126
-
Click Send.
-
Copy the access_token value from the response body. Do not include the double-quotes with the value.
You will use this access token value in the next section.
You can log into https://sam.spclouddave.com/sam/ with Username/Password: sampleuser/SampleUser.2017 to review available Smart APIs. Also, you can register a new Smart Client for Postman (be sure to use Resource Owner authorization flow) and use its client_id and client_secret values instead of the values listed above.