Sign in with email and password
Sign in with email and password
POST
https://example.com
/
api
/
auth
/
sign-in
/
email
Sign in with email and password
curl --request POST \
--url https://example.com/api/auth/sign-in/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>', password: '<string>'})
};
fetch('https://example.com/api/auth/sign-in/email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://example.com/api/auth/sign-in/email"
payload = {
"email": "<string>",
"password": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://example.com/api/auth/sign-in/email"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"redirect": false,
"token": "<string>",
"user": {
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"emailVerified": false,
"id": "<string>",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"banExpires": "2023-11-07T05:31:56Z",
"banReason": "<string>",
"banned": false,
"image": "<string>",
"role": "<string>"
},
"url": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Bearer token authentication
Body
application/json
⌘I
Sign in with email and password
curl --request POST \
--url https://example.com/api/auth/sign-in/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>', password: '<string>'})
};
fetch('https://example.com/api/auth/sign-in/email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://example.com/api/auth/sign-in/email"
payload = {
"email": "<string>",
"password": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://example.com/api/auth/sign-in/email"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"redirect": false,
"token": "<string>",
"user": {
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"emailVerified": false,
"id": "<string>",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"banExpires": "2023-11-07T05:31:56Z",
"banReason": "<string>",
"banned": false,
"image": "<string>",
"role": "<string>"
},
"url": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}
