Authorization
Local API endpoints require authorization. This article shows how to get authorized to use Nureva's local endpoints.
Accounts
Permissions required will vary, depending on the type of account. See the four account types below, listed in order of fewest permissions required to most permissions required.
monitoraccount: For third-party systems that can only monitor data streams. By default, this account is disabled.generalaccount: Includes all permissions from the previous account plus day-to-day operations such as audio settings. By default, this account has no password, but can be configurable in the future.integratoraccount: Includes all permissions from previous accounts plus room and integration configuration. By default, this account is disabled.adminaccount: Includes all permissions from previous accounts plus configuring security policies. By default, the password is the enrollment code which has the XXX-XXX-XXX format, but can be configurable in the future.
How to authenticate
Local API endpoints require an authorization header. Use the login endpoint with the admin account to retrieve the authParameters needed for authorization. In the case that the account info changes, run the login endpoint again to refresh authorization parameters.
- Set the path with the IP address of the Nureva device followed by
/api/v1/auth/login. - Update the request body to include the
accountproperty withadminas the value. Note: theaccountvalue is case-sensitive and should be lowercase. - Update the request body to include the
passwordproperty with the sample enrollment code ofABC-ABC-ABCas the value. - Update the headers to include
Nureva-Client-Idas key andintegration_app_nameas the value. - Update the headers to include
Nureva-Client-Versionas key and0.0.1as the value. - Update the headers to include
Content-typeas key andapplication/jsonas the value. - Send the POST request. The code sample below is a request to retrieve the authorization header.
curl --request POST \
--url https://10.0.0.1/api/v1/auth/login \
--header 'Nureva-Client-Id: integration_app_name' \
--header 'Nureva-Client-Version: 0.0.1' \
--header 'Content-type: application/json' \
--data '{"account": "admin", "password": "ABC-ABC-ABC"}'- A successful response with the above name and password would return the following. If authentication fails, please refer to the error responses documented here.
{
"authParameters": "YWRtaW46QUJDLUFCQy1BQkM="
}- From the response, set the Authorization header to
Nurevafollowed by the value received inauthParametersfor all authenticated endpoints, like in the example below.
curl --request GET \
--url https://10.0.0.1/api/v1/audio \
--header 'Authorization: Nureva YWRtaW46QUJDLUFCQy1BQkM=' \
--header 'Nureva-Client-Id: integration_app_name' \
--header 'Nureva-Client-Version: 0.0.1'The interactive console in the API reference also provides an easy way to try out the endpoints.
Tutorial complete! You now know how to authenticate.
Updated 9 days ago
