Connect User to NOX
curl --request POST \
--url https://auth.nox.energy/manufacturers/nox \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"manufacturer_user_id": "mfr_user_123",
"device_ids": [
"device_001",
"device_002"
]
}
'import requests
url = "https://auth.nox.energy/manufacturers/nox"
payload = {
"manufacturer_user_id": "mfr_user_123",
"device_ids": ["device_001", "device_002"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({manufacturer_user_id: 'mfr_user_123', device_ids: ['device_001', 'device_002']})
};
fetch('https://auth.nox.energy/manufacturers/nox', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://auth.nox.energy/manufacturers/nox",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'manufacturer_user_id' => 'mfr_user_123',
'device_ids' => [
'device_001',
'device_002'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://auth.nox.energy/manufacturers/nox"
payload := strings.NewReader("{\n \"manufacturer_user_id\": \"mfr_user_123\",\n \"device_ids\": [\n \"device_001\",\n \"device_002\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://auth.nox.energy/manufacturers/nox")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"manufacturer_user_id\": \"mfr_user_123\",\n \"device_ids\": [\n \"device_001\",\n \"device_002\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://auth.nox.energy/manufacturers/nox")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"manufacturer_user_id\": \"mfr_user_123\",\n \"device_ids\": [\n \"device_001\",\n \"device_002\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"timestamp": 1703123456,
"data": {
"manufacturer_user_id": "mfr_user_123",
"nox_user_id": "550e8400-e29b-41d4-a716-446655440000",
"device_ids": [
"device_001",
"device_002"
]
}
}{
"success": false,
"timestamp": 1703123456,
"error": "Missing API key",
"error_code": "missing_api_key",
"message": "Missing API key"
}{
"success": false,
"timestamp": 1703123456,
"error": "Missing API key",
"error_code": "missing_api_key",
"message": "Missing API key"
}Deprecated
Connect User to NOX
deprecated
Connects a manufacturer user to NOX without linking to an energy supplier account. Use this endpoint when the user does not need to be connected to an energy supplier via OAuth. Creates or updates the subscriber record with the provided device IDs.
POST
/
manufacturers
/
nox
Connect User to NOX
curl --request POST \
--url https://auth.nox.energy/manufacturers/nox \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"manufacturer_user_id": "mfr_user_123",
"device_ids": [
"device_001",
"device_002"
]
}
'import requests
url = "https://auth.nox.energy/manufacturers/nox"
payload = {
"manufacturer_user_id": "mfr_user_123",
"device_ids": ["device_001", "device_002"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({manufacturer_user_id: 'mfr_user_123', device_ids: ['device_001', 'device_002']})
};
fetch('https://auth.nox.energy/manufacturers/nox', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://auth.nox.energy/manufacturers/nox",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'manufacturer_user_id' => 'mfr_user_123',
'device_ids' => [
'device_001',
'device_002'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://auth.nox.energy/manufacturers/nox"
payload := strings.NewReader("{\n \"manufacturer_user_id\": \"mfr_user_123\",\n \"device_ids\": [\n \"device_001\",\n \"device_002\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://auth.nox.energy/manufacturers/nox")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"manufacturer_user_id\": \"mfr_user_123\",\n \"device_ids\": [\n \"device_001\",\n \"device_002\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://auth.nox.energy/manufacturers/nox")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"manufacturer_user_id\": \"mfr_user_123\",\n \"device_ids\": [\n \"device_001\",\n \"device_002\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"timestamp": 1703123456,
"data": {
"manufacturer_user_id": "mfr_user_123",
"nox_user_id": "550e8400-e29b-41d4-a716-446655440000",
"device_ids": [
"device_001",
"device_002"
]
}
}{
"success": false,
"timestamp": 1703123456,
"error": "Missing API key",
"error_code": "missing_api_key",
"message": "Missing API key"
}{
"success": false,
"timestamp": 1703123456,
"error": "Missing API key",
"error_code": "missing_api_key",
"message": "Missing API key"
}Authorizations
API key for authentication. You can also use 'Authorization: ApiKey YOUR_KEY' header.
Body
application/json
⌘I