Use Postman to get an access token for authentication using SAM - Intergraph Smart Engineering Manager - 7.0 - Installation & Upgrade - Hexagon

Intergraph Smart Engineering Manager Web API Installation and Configuration

ft:locale
en-US
Product
Intergraph Smart Engineering Manager
Subproduct
Web API
Search by Category
Installation & Upgrade
Smart Engineering Manager Web Version
7.0

After completing the registration in SAM, you must obtain an access token for authentication to call the Smart APIs that hold your data. You do this using the Security Token Service, a software component that issues access tokens for authenticated users. This procedure describes how to get a token.

The port numbers specified in the gRpcClient and gRpcServer configuration files must match. If the configured port is unavailable on the machine, use an alternative available port. The configuration files are available at:

  • [Product Folder]\Engineering Manager\7.0\gRpcClient\Appsetting.json

  • [Product Folder]\Engineering Manager\7.0\gRpcServer\App.config

  1. Launch Postman.

  2. Select the POST HTTP method.

  3. In the request URL, type the path to the SAM server your application is configured for, using the format:

    https://{SAMServer}.MyDomain.com/sam/oauth/connect/token

    For example:

    https://SAMServername.domain.com/sam/oauth/connect/token

  4. In the Body tab, select the x-www-form-urlencoded content type.

  5. Complete the form request by providing the following key / value pairs:

    Key

    Value

    grant_type

    password

    username

    password

    client_id

    *12345678-9ABC-DEF0-1234-56789ABCDEF0

    client_secret

    scope

    *FEDCBA98-7654-3210-FEDC-BA9876543210

    acr_values

    idp:*A1B2C3D4-E5F6-9876-5432-334455FEDCBA

  • The username and password key values apply to registered admin user in Smart API Manager (SAM).

  • The client_id and client_secret key values are generated during Smart Client registration in SAM.

  • The scope key value is generated during registration of SEM Web API in SAM.

  • Find the acr_values key in Smart API Manager Settings under the IDENTITY tab, within Identity Providers > Windows Credentials. Prefix the value with idp:.

    SHARED Tip To save time when entering the keys and their values, place the cursor in the Key field of the first row and paste the text from the Token Request keys.txt file provided to you.

  1. Select Send.

  2. Copy the accessToken value from the response body without the double-quotes.

    Typically, the access token is a long string that spans seven or more lines, depending on the window size in Postman.

  3. To use the token in a request, do the following:

  1. Type a new request or select an existing request.

  2. Select the Authorization tab.

  3. From the Auth Type field, select Bearer Token.

  4. In the Token field, paste the accessToken value.