Check the expiry date of your ApiKey
curl --request GET \
--url https://dev.api.nestapi.com/v1/apiKey/validUntil \
--header 'Accept: <accept>' \
--header 'Authorization: <api-key>'import requests
url = "https://dev.api.nestapi.com/v1/apiKey/validUntil"
headers = {
"Accept": "<accept>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Accept: '<accept>', Authorization: '<api-key>'}};
fetch('https://dev.api.nestapi.com/v1/apiKey/validUntil', 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://dev.api.nestapi.com/v1/apiKey/validUntil",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://dev.api.nestapi.com/v1/apiKey/validUntil"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dev.api.nestapi.com/v1/apiKey/validUntil")
.header("Accept", "<accept>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.nestapi.com/v1/apiKey/validUntil")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"Expires": "2023-11-07T05:31:56Z"
}account
Check the expiry date of your ApiKey
This endpoint requires calling with your Api Key.
If your Api key has an expiry it will return when it expires.
If your Api key does not expire, it will return 31/12/9999 as the expiry date.
GET
/
v1
/
apiKey
/
validUntil
Check the expiry date of your ApiKey
curl --request GET \
--url https://dev.api.nestapi.com/v1/apiKey/validUntil \
--header 'Accept: <accept>' \
--header 'Authorization: <api-key>'import requests
url = "https://dev.api.nestapi.com/v1/apiKey/validUntil"
headers = {
"Accept": "<accept>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Accept: '<accept>', Authorization: '<api-key>'}};
fetch('https://dev.api.nestapi.com/v1/apiKey/validUntil', 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://dev.api.nestapi.com/v1/apiKey/validUntil",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://dev.api.nestapi.com/v1/apiKey/validUntil"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dev.api.nestapi.com/v1/apiKey/validUntil")
.header("Accept", "<accept>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.nestapi.com/v1/apiKey/validUntil")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"Expires": "2023-11-07T05:31:56Z"
}⌘I