Connect User to NOX
curl --request POST \
--url https://auth.nox.energy/users/{userId}/link \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"redirect_uri": "https://your-app.com/callback",
"language": "en"
}
'import requests
url = "https://auth.nox.energy/users/{userId}/link"
payload = {
"redirect_uri": "https://your-app.com/callback",
"language": "en"
}
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({redirect_uri: 'https://your-app.com/callback', language: 'en'})
};
fetch('https://auth.nox.energy/users/{userId}/link', 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/users/{userId}/link",
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([
'redirect_uri' => 'https://your-app.com/callback',
'language' => 'en'
]),
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/users/{userId}/link"
payload := strings.NewReader("{\n \"redirect_uri\": \"https://your-app.com/callback\",\n \"language\": \"en\"\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/users/{userId}/link")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"redirect_uri\": \"https://your-app.com/callback\",\n \"language\": \"en\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://auth.nox.energy/users/{userId}/link")
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 \"redirect_uri\": \"https://your-app.com/callback\",\n \"language\": \"en\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"timestamp": 1703123456,
"data": {
"link_token": "abc123def456ghi789jkl012mno345pqr678stu901vwx234yz",
"link_url": "https://link.nox.com/connect?token=abc123def456ghi789jkl012mno345pqr678stu901vwx234yz",
"expires_at": 1703124056,
"supplier_id": "supplier_123",
"supplier_user_id": "user_456",
"brand": "daikin"
}
}{
"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 user to NOX with the intent of linking them to a manufacturer asset. Provides a link_url where the user should be redirected to complete the manufacturer authentication flow.
POST
/
users
/
{userId}
/
link
Connect User to NOX
curl --request POST \
--url https://auth.nox.energy/users/{userId}/link \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"redirect_uri": "https://your-app.com/callback",
"language": "en"
}
'import requests
url = "https://auth.nox.energy/users/{userId}/link"
payload = {
"redirect_uri": "https://your-app.com/callback",
"language": "en"
}
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({redirect_uri: 'https://your-app.com/callback', language: 'en'})
};
fetch('https://auth.nox.energy/users/{userId}/link', 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/users/{userId}/link",
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([
'redirect_uri' => 'https://your-app.com/callback',
'language' => 'en'
]),
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/users/{userId}/link"
payload := strings.NewReader("{\n \"redirect_uri\": \"https://your-app.com/callback\",\n \"language\": \"en\"\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/users/{userId}/link")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"redirect_uri\": \"https://your-app.com/callback\",\n \"language\": \"en\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://auth.nox.energy/users/{userId}/link")
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 \"redirect_uri\": \"https://your-app.com/callback\",\n \"language\": \"en\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"timestamp": 1703123456,
"data": {
"link_token": "abc123def456ghi789jkl012mno345pqr678stu901vwx234yz",
"link_url": "https://link.nox.com/connect?token=abc123def456ghi789jkl012mno345pqr678stu901vwx234yz",
"expires_at": 1703124056,
"supplier_id": "supplier_123",
"supplier_user_id": "user_456",
"brand": "daikin"
}
}{
"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.
Path Parameters
The supplier's unique identifier for the user
Example:
"user_123"
Body
application/json
URL where the user will be redirected after authentication. Must be registered with your supplier account.
Example:
"https://your-app.com/callback"
Language code for the UI
Example:
"en"
Optional brand to pre-select for authentication. If provided, users will be taken directly to this brand's authentication instead of the brand selection screen. Only supported brands are accepted.
Available options:
daikin, dewarmte, viessmann, nibe, samsung, alpha-innotec, lg, mitsubishi, vaillant, bulex, saunier-duval, thermia, toshiba Example:
"daikin"