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 two account types below, listed in order of fewest permissions required to most permissions required.
-
generalaccount: Includes monitoring data streams, day-to-day operations such as audio settings, room configuration, and integration configuration.By default for HDL310, HDL410, and HDX, the password is the enrollment code which has the XXX-XXX-XXX format. Existing HDL310 and 410 deployments continue to have blank password until a factory reset is performed.
For security, it is recommended to update HDL310/HDL410 password from the blank default. For more information on updating the
generalpassword, go to third-party integration password. -
adminaccount: Includes all permissions fromgeneralaccount plus configuring security policies.By default for HDL310, HDL410, and HDX, the password is the enrollment code which has the XXX-XXX-XXX format. Performing a factory reset will set the password to enrollment code.
For more information on resetting the password, go to HDL310/HDL410 password or HDX password.
How to authenticate
Local API endpoints require an authorization header. For third-party integration apps, it is recommended to use the general account.
Use the login endpoint with the general account to retrieve the authParameters needed for authorization. In the case that the account password 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 withgeneralas the value. Note: theaccountvalue is case-sensitive and should be lowercase. - Update the request body to include the
passwordproperty with the sample password ofintegration123as the value. (By default, the password is either blank or set to the enrollment code. A custom password can be configured through the Nureva app.) - 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": "general", "password": "integration123"}'- 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": "Z2VuZXJhbDppbnRlZ3JhdGlvbjEyMw=="
}- 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 Z2VuZXJhbDppbnRlZ3JhdGlvbjEyMw==' \
--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 20 days ago
