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
-
Launch Postman.
-
Select the POST HTTP method.
-
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
-
In the Body tab, 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
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:.
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.
-
Select Send.
-
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.
-
To use the token in a request, do the following:
-
Type a new request or select an existing request.
-
Select the Authorization tab.
-
From the Auth Type field, select Bearer Token.
-
In the Token field, paste the accessToken value.