Sign In
curl --request POST \
--url https://api.replyke.com/api/v6/:projectId/auth/sign-in \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/auth/sign-in"
payload = {
"email": "<string>",
"password": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>', password: '<string>'})
};
fetch('https://api.replyke.com/api/v6/:projectId/auth/sign-in', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/auth/sign-in",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/auth/sign-in"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.replyke.com/api/v6/:projectId/auth/sign-in")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/auth/sign-in")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"accessToken": "<string>",
"refreshToken": "<string>",
"user": {
"id": "<string>",
"email": "<string>",
"username": "<string>",
"name": "<string>",
"avatar": "<string>",
"bio": "<string>",
"location": {
"type": "<string>",
"coordinates": [
123
]
},
"birthdate": "<string>",
"metadata": {},
"suspensions": [
{}
],
"reputation": 123,
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Auth Endpoints
Sign In
Authenticate a user using email and password
POST
/
:projectId
/
auth
/
sign-in
Sign In
curl --request POST \
--url https://api.replyke.com/api/v6/:projectId/auth/sign-in \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/auth/sign-in"
payload = {
"email": "<string>",
"password": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>', password: '<string>'})
};
fetch('https://api.replyke.com/api/v6/:projectId/auth/sign-in', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/auth/sign-in",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/auth/sign-in"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.replyke.com/api/v6/:projectId/auth/sign-in")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/auth/sign-in")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"accessToken": "<string>",
"refreshToken": "<string>",
"user": {
"id": "<string>",
"email": "<string>",
"username": "<string>",
"name": "<string>",
"avatar": "<string>",
"bio": "<string>",
"location": {
"type": "<string>",
"coordinates": [
123
]
},
"birthdate": "<string>",
"metadata": {},
"suspensions": [
{}
],
"reputation": 123,
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Authenticate a user using email and password. Returns an access token, a refresh token, and user data.
Body Parameters
string
required
User’s registered email address
string
required
User’s password
Response
boolean
Indicates whether the authentication was successful
string
JWT access token for authenticating API requests (expires in 30 minutes)
string
JWT refresh token for obtaining new access tokens (valid for 30 days)
User Object
Show properties
Show properties
string
Unique user identifier
string
User’s email address
string
User’s unique username
string
User’s full name
string
URL to user’s avatar image
string
User’s biography
string
User’s birthdate in ISO 8601 format
object
Custom public metadata
array
Array of active suspensions
number
User’s reputation score
string
Account creation timestamp
string
Last update timestamp
Error Responses
Missing Fields - 400 Bad Request
Missing Fields - 400 Bad Request
{
"error": "Email, and password are required.",
"code": "auth/missing-fields"
}
User Not Found - 403 Forbidden
User Not Found - 403 Forbidden
{
"error": "User not found.",
"code": "auth/no-user-found"
}
Missing Credentials - 403 Forbidden
Missing Credentials - 403 Forbidden
{
"error": "Invalid credentials.",
"code": "auth/invalid-credentials"
}
Incorrect Password - 401 Unauthorized
Incorrect Password - 401 Unauthorized
{
"error": "Incorrect password.",
"code": "auth/wrong-password"
}
Server Error - 500 Internal Server Error
Server Error - 500 Internal Server Error
{
"error": "Internal server error.",
"code": "auth/server-error",
"details": "<Error message>"
}
Notes
- On success, an HttpOnly cookie named
replyke-refresh-jwtis set. - The
accessTokenis returned in the response body and expires in 30 minutes. - Refresh token is valid for 30 days.
- Active suspensions are included in the response user object.
- Only valid users with matching credentials can sign in.
⌘I

