Reseller account switching
Introduction
In the Eagle Eye Cloud VMS resellers are able to create end user <<glossary:account>>s for their clients. A reseller can access their end user <<glossary:account>>s to provide various services such as configuration and troubleshooting. The /authorizationTokens API allows a reseller to retrieve a <<glossary:access token>> for a particular end user <<glossary:account>>.
Retrieving an access token for an end user
Follow these steps to retrieve an <<glossary:access token>> for an end user <<glossary:account>>:
ImportantGetting an <<glossary:access token>> for an end user <<glossary:account>> does not void the reseller's <<glossary:access token>>. The reseller can use its own <<glossary:access token>> to log in to its own <<glossary:account>> after the account switching process.
- Log in with a reseller <<glossary:account>> by following the regular Login process.
- Get a list of <<glossary:account>>s your reseller <<glossary:account>> has access permissions to through the /accounts endpoint.
- Retrieve the given end user's token with the following
POST
request:
curl --location 'https://auth.eagleeyenetworks.com/api/v3.0/authorizationTokens' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "Authorization: Bearer <reseller's access token>" \
--data "{
'type': 'reseller',
'targetType': 'account',
'targetId': '<end-user's account ID>',
'scopes': [
'vms.all'
]
}"
A sample response to the above request:
{
"accessToken": "string",
"expireTimestamp": "2023-06-23T13:26:29.368Z",
"scopes": [
"string"
]
}
Updated 9 days ago