See api-docs Menu

Postman Collections

Download a Postman Collection that provides all of the calls available for each of our OneLogin resources.

Try it out with a test account first: Start off using a Postman Collection with a test OneLogin account and API credentials.

Once you’ve familiarized yourself with the API’s behavior, switch over to using your production OneLogin account and API credentials.

Setting Up Postman Environment Variables

To use the Postman Collections provided further down this page (and on each individual API doc page), you’ll need to set up environment variables in Postman.

You’ll use these environment variables to set values that Postman needs to make an API call. Why don’t the Postman Collections include these values as delivered? This is because the values are unique, and even private, to your OneLogin account environment. For example, you’ll create environment variables to provide values for your client ID and secret, data shard, access token, subdomain, and so forth.

Setting up the environment variables requires some upfront work, but will make repeated use of the Postman Collections a lot more convenient.

To set up Postman environment variables:

  1. If you do not already have Postman installed, install it.

  2. Identify the environment variables that you want to define. Download and open a OneLogin Postman Collection. Variable names are wrapped in {{ }}. For example, {{access_token}}. You’ll see these environment variables in the endpoint URL and Headers areas of the Postman Collection. For example:

  3. In the top right corner of Postman, click the environment selector and select Manage environments.

  4. Click Add to add a new environment where you’ll define your OneLogin environment variables.

  5. Give the environment a name that clearly identifies the OneLogin API version and environment. For example:

  6. In the Key field, enter the name of the environment variable present in the Postman Collection, minus the {{ }}. In the Value field, enter your OneLogin account-specific value that will replace the variable when the call is made. For example:

    Note: You’ll need to use your API credentials to generate the access_token value. Access tokens expire 10 hours after creation, so you’ll need to update the access_token environment variable value more often than the other values you’ve defined.

    Warning: If you share your Postman Collections, be sure to not inadvertently also share your API credentials or access token values.

  7. Once we’ve defined your key value pairs, click Submit.

  8. Use the OneLogin Postman Collection to make some calls. Be sure that the correct environment is selected.

OAuth 2.0 Tokens

Download the Postman Collection for the OAuth 2.0 Tokens API

To use this Postman Collection, you must define the following environment variables:

{{us_or_eu}}

Set this to the data shard your account resides in. This is not necessarily tied to your geographical location.

{{client_id}}

Set this to the client ID generated when you created your API credentials.

{{client_secret}}

Set this to the client secret generated when you created your API credentials.

OpenID Connect

Download the Postman Collection for the OpenID Connect API.

To use this Postman Collection, you must define the following environment variables:

{{subdomain}}

Set to the subdomain of your OneLogin instance.

{{OIDC_client_id}}

Set this to the Client ID that was assigned to your OpenID Connect app in the OneLogin portal.

{{OIDC_client_secret}}

Set this to the Client Secret that was assigned to your OpenID Connect app in the OneLogin portal.

{{OIDC_redirect_uri}}

Set this to the Redirect URI that you assigned to your OpenID Connect app in the OneLogin portal.

Users

Download the Postman Collection for the Users API

To use this Postman Collection, you must define the following environment variables:

{{us_or_eu}}

Set this to the data shard your account resides in. This is not necessarily tied to your geographical location.

{{access_token}}

Set this to the access token you generated using your API credentials.

{{user_id}}

Set this to the user ID for which you want to make a request.

{{username}} Set this to the username for which you want to make a request.

{{host}}

Start out using this Postman Collection with a sandbox host (<your_sandbox>.onelogin.com

Once you’ve familiarized yourself with the API’s behavior, you can use it with a production account and set this value to <your_subdomain>.onelogin.com

Multi Factor Authentication

Download the Postman Collection for the Multi Factor Authentication API

To use this Postman Collection, you must define the following environment variables:

{{region}}

Either “us” or “eu”. Set this to the data shard your account resides in. This is not necessarily tied to your geographical location.

{{access_token}}

Set this to the access token you generated using your API credentials.

{{user_id}}

Set this to the user ID for which you want to make a request.

SAML Assertions

Download the Postman Collection for the SAML Assertion API

To use this Postman Collection, you must define the following environment variables:

{{us_or_eu}}

Set this to the data shard your account resides in. This is not necessarily tied to your geographical location.

{{access_token}}

Set this to the access token you generated using your API credentials.

Embed Apps

Download the Postman Collection for the Embed Apps API

To use this Postman Collection, you must define the following environment variables:

{{host}}

Start out using this Postman Collection with a sandbox host (<your_sandbox>.onelogin.com

Once you’ve familiarized yourself with the API’s behavior, you can use it with a production account and set this value to <your_subdomain>.onelogin.com.

{{embedding_token}}

Set to the embedding token for your account. To get your embedding token, go to OneLogin and navigate to SettingsEmbedding.

{{email}}

Set to the email of the user for which you want to return a list of embeddable apps.

Roles

Download the Postman Collection for the Roles API

To use this Postman Collection, you must define the following environment variables:

{{us_or_eu}}

Set this to the data shard your account resides in. This is not necessarily tied to your geographical location.

{{access_token}}

Set this to the access token you generated using your API credentials.

{{role_id}}

Set this to the role ID for which you want to make a request.

{{role_name}} Set this to the name of the role for which you want to make a request.

Events

Download the Postman Collection for the Events API

To use this Postman Collection, you must define the following environment variables:

{{us_or_eu}}

Set this to the data shard your account resides in. This is not necessarily tied to your geographical location.

{{access_token}}

Set this to the access token you generated using your API credentials.

{{event_id}}

Set this to the event ID for which you want to make a request.

{{event_type_id}}

Set to the event type ID of the events you want to return.

Groups

Download the Postman Collection for the Groups API

To use this Postman Collection, you must define the following environment variables:

{{us_or_eu}}

Set this to the data shard your account resides in. This is not necessarily tied to your geographical location.

{{access_token}}

Set this to the access token you generated using your API credentials.

{{group_id}}

Set this to the group ID for which you want to make a request.

Invite Links

Download the Postman Collection for the Invite Link API

To use this Postman Collection, you must define the following environment variables:

{{us_or_eu}}

Set this to the data shard your account resides in. This is not necessarily tied to your geographical location.

{{access_token}}

Set this to the access token you generated using your API credentials.


Have a Question?

Have a how-to question? Seeing a weird error? Ask us about it on StackOverflow.

Found a bug? Submit a support ticket.

Have a product idea or request? Share it with us in our Ideas Portal.