Authorization - use Postman to get an access token - Intergraph Smart API Manager - 2020 (4.0) - Help

Intergraph Smart API Manager Help

Language
English
Product
Intergraph Smart API Manager
Search by Category
Help
Smart API Manager Version
4.0

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.

What can I use instead?

To follow along with the examples in this documentation, you can use any Smart API that your company has deployed and the instance of Smart API Manager that it is registered with. For help installing and configuring Smart API Manager, see the Smart API Manager Installation and Configuration Guide. For help installing and configuring a Smart API, see the documentation for that Smart API on our documentation web site at https://docs.hexagonali.com.

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

  1. Install Postman from the Chrome Web Store.

  2. In Chrome, go to the Apps tab (chrome://apps) and start Postman.

Use Postman to get an access token

  1. Select the POST HTTP method and enter the following URL:

    https://sam.spclouddave.com/sam/oauth/connect/token

  2. Click the Body tab below the URL address.

  3. Select the x-www-form-urlencoded content type.

  4. 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

  5. Click Send.

  6. 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.

SHARED Tip 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.