Request an account-change email code
curl --request POST \
--url https://api.glassmarkets.io/v1/user/email-2fa/challenge/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>"
}
'import requests
url = "https://api.glassmarkets.io/v1/user/email-2fa/challenge/"
payload = { "password": "<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>'})
};
fetch('https://api.glassmarkets.io/v1/user/email-2fa/challenge/', 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/email-2fa/challenge/"
payload := strings.NewReader("{\n \"password\": \"<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/email-2fa/challenge/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\"\n}")
.asString();{
"challenge_id": "<string>"
}Account
Request an account-change email code
Sends a verification code after checking the current password. Only available to invited accounts using email verification; the code is bound to the requested action.
POST
/
v1
/
user
/
email-2fa
/
challenge
/
Request an account-change email code
curl --request POST \
--url https://api.glassmarkets.io/v1/user/email-2fa/challenge/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>"
}
'import requests
url = "https://api.glassmarkets.io/v1/user/email-2fa/challenge/"
payload = { "password": "<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>'})
};
fetch('https://api.glassmarkets.io/v1/user/email-2fa/challenge/', 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/email-2fa/challenge/"
payload := strings.NewReader("{\n \"password\": \"<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/email-2fa/challenge/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\"\n}")
.asString();{
"challenge_id": "<string>"
}Authorizations
Token-based authentication with required prefix "Token ". Example: "Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
Maximum string length:
64
