Authenticate using user credentials
To authenticate using user credentials, you’ll use the Swagger UI to generate an access token.
Before you begin
To access the API using user credentials, ensure that users are assigned the P1AS Self-Service role. To assign these roles, you must be a PingOne Identity Data Admin. You can find instructions in Assigning Self-Service roles.
Steps
-
Navigate to the interactive documentation. You can find instructions in Accessing the API interactive documentation.
-
Click Get Token at the top of the page.
A new tab opens and redirects you to the sign-on page.
-
Enter your credentials and click Submit.
If authentication is successful, you’ll be redirected to the Success page and a Copy Token button displays.
-
Click Copy Token.
-
From there, you can use the token in different ways. You can:
-
Use the Swagger UI.
-
Click Authorize, which is next to Get Token.
-
Paste the token in the input field, and Authorize, and then click Close. All API requests that come from Swagger UI will now be authenticated.
-
-
Query the API directly using other tools, such as Postman or cURL, and include the bearer token in the headers.
Example
{"Authorization": "Bearer {TOKEN}"}
-