Get your two-factor authentication status
curl --request GET \
--url https://api.glassmarkets.io/v1/user/totp/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.glassmarkets.io/v1/user/totp/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.glassmarkets.io/v1/user/totp/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.glassmarkets.io/v1/user/totp/"
req, _ := http.NewRequest("GET", url, nil)
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://api.glassmarkets.io/v1/user/totp/")
.header("Authorization", "<api-key>")
.asString();{
"email_available": true,
"email_enabled": true,
"available": true,
"enabled": true,
"confirmed_at": "2023-11-07T05:31:56Z",
"recovery_codes_remaining": 123
}Account
Get your two-factor authentication status
Returns whether two-factor authentication is on for the logged-in user, and how many recovery codes remain.
GET
/
v1
/
user
/
totp
/
Get your two-factor authentication status
curl --request GET \
--url https://api.glassmarkets.io/v1/user/totp/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.glassmarkets.io/v1/user/totp/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.glassmarkets.io/v1/user/totp/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.glassmarkets.io/v1/user/totp/"
req, _ := http.NewRequest("GET", url, nil)
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://api.glassmarkets.io/v1/user/totp/")
.header("Authorization", "<api-key>")
.asString();{
"email_available": true,
"email_enabled": true,
"available": true,
"enabled": true,
"confirmed_at": "2023-11-07T05:31:56Z",
"recovery_codes_remaining": 123
}
