Reseller account switching
Introduction
In the Eagle Eye Cloud VMS resellers are able to create end user accounts for their clients. A reseller can access their end user accounts to provide various services such as configuration and troubleshooting. The /authorizationTokens API allows a reseller to retrieve a access token for a particular end user account.
🛠️
Reseller Account Switching
Open Recipe
Retrieving an access token for an end user
Follow these steps to retrieve an access token for an end user account:
Important
Getting an access token for an end user account does not void the reseller's access token. The reseller can use its own access token to log in to its own account after the account switching process.
- Log in with a reseller account by following the regular Login process.
- Get a list of accounts your reseller 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 4 days ago