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.
monitor
account: For third-party systems that can only monitor data streams. By default, this account is disabled.general
account: 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.integrator
account: Includes all permissions from previous accounts plus room and integration configuration. By default, this account is disabled.admin
account: 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
account
property withadmin
as the value. Note: theaccount
value is case-sensitive and should be lowercase. - Update the request body to include the
password
property with the sample enrollment code ofABC-ABC-ABC
as the value. - Update the headers to include
Nureva-Client-Id
as key andintegration_app_name
as the value. - Update the headers to include
Nureva-Client-Version
as key and0.0.1
as the value. - Update the headers to include
Content-type
as key andapplication/json
as 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
Nureva
followed by the value received inauthParameters
for 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 1 day ago