Using the OneLogin API

Use OneLogin’s product API to interact with your organization’s data and to develop third-party apps that incorporate and build upon OneLogin’s core product features.

Base URL

All API requests should be made to https://api.onelogin.com.

Authorization

All API requests must include an Authorization header that consists of your API key and the letter x.

  • For cURL calls, use this format to provide the Authorization header: -u <your_api_key>:x.
  • For Postman calls that you’ve configured yourself, select Basic Auth and provide your API key in the Username field and the letter x in the Password field.
  • For Postman calls made using a Postman Collection you downloaded from this site, you’ll need to set the following environment variables:
    • &#123;&#123;api_key&#125;&#125;: Set to your account’s API key
    • &#123;&#123;password&#125;&#125;: Set to x.

Take care of your API key: Your API key is extremely powerful and must be kept private and be used with care. We strongly recommend that you start exploring an API with a test OneLogin account and API key. Once you’ve familiarized yourself with the API’s behavior, switch over to using your production OneLogin account and API key.

Get an API Key

  • If you are a OneLogin superuser or account owner, you have access to an API key. To get your API key, access OneLogin and go to Settings > API. At the bottom left of the API Access page, click View Legacy API Key.
  • If you have a OneLogin account, but are not a OneLogin superuser or account owner, contact your OneLogin administrator for more details about getting an API key.
  • If you do not have a OneLogin account, sign up for a free Developer account. You will be the account owner and will have access to an API key. To get your API key, access OneLogin and go to Settings > API. At the bottom left of the API Access page, click View Legacy API Key.