This API returns a list of child accounts under the authenticated reseller’s account.
Required Feature
Reseller privileges are required to use this API.
Resource URL
GET https://<subdomain>.onelogin.com/api/v1/accountsHeader Parameters
Authorization required string | Set to Set Generate the access token with the API credential pair created using the scope required to call this API. Call this API using the |
Request Parameters
include_keys boolean | If set, includes account keys in the response. |
Sample Response
- 200 OK
- 404 Insufficient Privileges
p>If successful, an XML list of accounts is returned.
This error indicates a lack of sufficient privileges. Ensure the user is a reseller or OneLogin account.
{
"statusCode": 404,
"name": "InsufficientPrivileges",
"message": "Only resellers may use this API."
}Sample Code
By default, all API responses are returned in XML format. To receive JSON responses, set the HTTP header: ```http Accept: application/json ``` Most modern HTTP clients (curl, httpie, Postman, etc.) support this via the `-H` or `--header` flag.cURL
curl 'https://<subdomain>.onelogin.com/api/v1/accounts' \
-X GET \
-H "Authorization: Bearer <access_token>"Postman Collection
Be sure to set Postman-specific environment variables indicated by {{ }}.
Have a Question?
Found a problem or a bug? Submit a support ticket.
Looking for walkthroughs or how-to guides? Check out our Knowledge Base.
Have a product idea or request? Share it in our Ideas Portal.