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: Environment variables in Postman collection
  3. In the top right corner of Postman, click the environment selector and select **Manage environments**. Environment selector in Postman
  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: Name environment dialog in Postman
  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: Key value pairs configuration in Postman

    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.

API Domain

All of the postman collections require that an {{subdomain}} environment variable has been set based on the subdomain for the account being used.

  • ```text .onelogin.com ```

    Version 2 Collections

    Collections for version 1 APIs can be found here.

    OAuth 2.0 Access Tokens

    Use this collection to generate an access_token that can be used to make requests using the other collections.

    Download

    API Authorization

    Use this collection to create and manage authorization tokens for your own APIs or resource servers.

    Download

    Apps

    Use this collection to create and manage applications.

    Download

    SAML Assertions

    Use this collection to generate a SAML assertion for a given application.

    Download

    User Mappings

    Use this collection to create and manage User Mappings.

    Download

    Vigilance AI

    Use this collection to train Vigilance AI, generate risk scores and configure risk rules.

    Download