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
-
Create a new POST request.
-
In the address bar, enter the token URL.
-
Click Body and select raw.
-
Select JSON.
-
In the Body text box, enter the authentication details, as follows:
-
For providerURL, use your hostname.
-
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"
}
-
-
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.
Copy the access token from the authentication response
-
In the response body, find the AuthToken parameter and copy the value.
-
Now, you can use the access token to request a resource.