Get an access token using the Basic Authentication grant type - Intergraph Smart Completions - Intergraph Smart Completions Update 4 - Customization & Programming

Intergraph Smart Completions Smart API Programmer's Getting Started Guide

Language
English
Product
Intergraph Smart Completions
Search by Category
Customization & Programming
Smart Completions Version
6.0.4

This example shows how to get an access token for a Postman client application when using the Basic Authentication grant type.

Authorization information

For this example, you need to know the following:

  • Token URL - https://<hostname>/api/Authentication.asmx/Authenticate

    Here, the hostname for the identity provider is the same as that for Smart Completions because the basic authentication grant type is only supported for the Smart Completions Authentication identity provider. When using other identity providers, the hostname for the Identity provider will be different than the hostname for Smart Completions.

  • Base URL - https://<hostname>/sc/datalake/v1

  • Username - Your Smart Completions username

  • Password - Your Smart Completions password

Get the access token

5 - Exploring Smart API with Postman 1

  1. Create a new POST request.

  2. In the address bar, enter the token URL.

  3. Click Body and select raw.

  4. Select JSON.

  5. In the Body text box, enter the authentication details, as follows:

    1. For providerURL, use your hostname.

    2. For UserName and Password, use your Smart Completions credentials.

      {

      "providerURL":"https://smartcompletions.acme.com",

      "UserName":"john",

      "Password":"John@123",

      "ip":"0.0.0.1",

      "isMobile":"0"

      }

  6. Click Send.

    If the request succeeds, you get a response with the status code 200 and the access token you need to access the API.

    6 - Exploring Smart API with Postman 2

Copy the access token from the authentication response

  1. In the response body, find the AuthToken parameter and copy the value.

  2. Now, you can use the access token to request a resource.