Login
Validate a signalId/signalToken pair and return a JWT that can be used to authorize other requests.
curl -X POST "https://api.nexus.usehardal.com/auth/login" \
-H "Content-Type: application/json" \
-d '{
"signalId": "example_string",
"signalToken": "example_string"
}'
import requests
import json
url = "https://api.nexus.usehardal.com/auth/login"
headers = {
"Content-Type": "application/json"
}
data = {
"signalId": "example_string",
"signalToken": "example_string"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.nexus.usehardal.com/auth/login", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"signalId": "example_string",
"signalToken": "example_string"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"signalId": "example_string",
"signalToken": "example_string"
}`)
req, err := http.NewRequest("POST", "https://api.nexus.usehardal.com/auth/login", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.nexus.usehardal.com/auth/login')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
"signalId": "example_string",
"signalToken": "example_string"
}'
response = http.request(request)
puts response.body
{
"token": "example_string",
"signalId": "example_string",
"ttl": 3.14,
"issuedAt": 3.14,
"expiresAt": 3.14,
"expiresIn": 3.14
}
POST
/auth/login
POST
Base URLstring
Target server for requests. Edit to use your own host.
Content-Typestring
RequiredThe media type of the request body
Options: application/json, multipart/form-data, text/plain
signalIdstring
RequiredSignal identifier that will own the session
Min length: 1
signalTokenstring
RequiredAPI token issued for the signal
Min length: 1
Request Preview
Response
Response will appear here after sending the request
Body
signalIdstring
RequiredSignal identifier that will own the session
signalTokenstring
RequiredAPI token issued for the signal
Responses
tokenstring
RequiredSigned JWT token
signalIdstring
RequiredSignal identifier embedded in the token
ttlnumber
RequiredToken time-to-live in seconds
issuedAtnumber
RequiredIssued-at timestamp (seconds since Unix epoch)
expiresAtnumber
RequiredExpiration timestamp (seconds since Unix epoch)
expiresInnumber
RequiredRemaining seconds until expiration
Was this page helpful?