v1-v3 APIs have been deprecated.
Although these APIs are not shut off yet, all new development with APIs should use the newest version of our API if available, and the version /1 in all other cases. These later versions are based on RESTful principles, secured by OAuth 2.0, and provide JSON messages, search, pagination, sorting, and filtering.
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:
-
{{api_key}}
: Set to your account’s API key -
{{password}}
: Set tox
.
-
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.
Have a Question?
Found a problem or a bug? Submit a support ticket.
Looking for walkthroughs or how-to guides on OneLogin's user and admin features? Check out the documentation in our Knowledge Base.
Have a product idea or request? Share it with us in our Ideas Portal.