Get Account by ID
Gets an account under a reseller account. This API can be used by reseller accounts only.
For a description of each element in the Account resource, see Account Resource.
Resource URL
https://api.onelogin.com/api/v1/accounts/:id
Parameters
id string |
Set to the account’s id with .xml appended. For example, 123456.xml. If you don’t know the account’s id, use the Get Accounts API call to return all accounts and their id values. |
Sample Response
- 200 OK
- 400 Bad Request
- 404 Not Found
<account>
<address1></address1>
<address2></address2>
<city></city>
<country>US</country>
<created-at>2015-03-23T14:24:23-07:00</created-at>
<homepage></homepage>
<id>12345</id>
<name>ECo</name>
<notes></notes>
<phone></phone>
<remotetoken>1x1xxx111xx11xx1xx1xxx1x1xx1111111111x11</remotetoken>
<state></state>
<updated-at>2015-03-23T14:24:23-07:00</updated-at>
<zip></zip>
<roles>
<role>
<id>22222</id>
<name>Default</name>
</role>
</roles>
</account>
<error>
<message>API key is invalid or missing</message>
<code>invalid_or_missing_api_key</code>
</error>
<error>
<title>No such account</title>
<message>No account found by id 59</message>
</error>
Sample cURL Request
Be sure to replace placeholder values surrounded by { } with actual values.
curl -u {api_key}:x -X GET https://api.onelogin.com/api/v1/accounts/{account_id}.xml
Postman Collection
Be sure to set Postman-specific environment variables indicated by {{ }}.
Download for the Accounts API
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.