Device authentication
POST
/api/devices/v1/otapulse/auth/requests
const url = 'https://example.com/api/devices/v1/otapulse/auth/requests';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/devices/v1/otapulse/auth/requestsDevice authentication endpoint.
Accepts two auth modes:
-
X-API-Key header — validates the key and returns a text response, for backward compatibility with older agents.
-
Token body — the client sends a JSON body with
tenant_tokenset to the API key. The server validates the token and returns a signed JWT that the client uses asAuthorization: Bearer <jwt>on subsequent requests.
The OTA-Pulse device agent uses mode 2.
Responses
Section titled “ Responses ”Successful Response
Media type application/json
Example generated
example