Start two-factor authentication setup
curl --request POST \
--url https://api.glassmarkets.io/v1/user/totp/options/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>",
"email_challenge_id": "<string>",
"email_code": "<string>"
}
'import requests
url = "https://api.glassmarkets.io/v1/user/totp/options/"
payload = {
"password": "<string>",
"email_challenge_id": "<string>",
"email_code": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({password: '<string>', email_challenge_id: '<string>', email_code: '<string>'})
};
fetch('https://api.glassmarkets.io/v1/user/totp/options/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.glassmarkets.io/v1/user/totp/options/"
payload := strings.NewReader("{\n \"password\": \"<string>\",\n \"email_challenge_id\": \"<string>\",\n \"email_code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://api.glassmarkets.io/v1/user/totp/options/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\",\n \"email_challenge_id\": \"<string>\",\n \"email_code\": \"<string>\"\n}")
.asString();{
"setup_id": "<string>",
"secret": "<string>",
"provisioning_uri": "<string>"
}Account
Start two-factor authentication setup
Returns a new authenticator secret and its provisioning URI. Needs your password. Finish with POST /v1/user/totp/setup/.
POST
/
v1
/
user
/
totp
/
options
/
Start two-factor authentication setup
curl --request POST \
--url https://api.glassmarkets.io/v1/user/totp/options/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>",
"email_challenge_id": "<string>",
"email_code": "<string>"
}
'import requests
url = "https://api.glassmarkets.io/v1/user/totp/options/"
payload = {
"password": "<string>",
"email_challenge_id": "<string>",
"email_code": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({password: '<string>', email_challenge_id: '<string>', email_code: '<string>'})
};
fetch('https://api.glassmarkets.io/v1/user/totp/options/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.glassmarkets.io/v1/user/totp/options/"
payload := strings.NewReader("{\n \"password\": \"<string>\",\n \"email_challenge_id\": \"<string>\",\n \"email_code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://api.glassmarkets.io/v1/user/totp/options/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\",\n \"email_challenge_id\": \"<string>\",\n \"email_code\": \"<string>\"\n}")
.asString();{
"setup_id": "<string>",
"secret": "<string>",
"provisioning_uri": "<string>"
}Authorizations
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data

