Skip to main content
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>"
}'
{
  "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

email
string
required
User’s registered email address
password
string
required
User’s password

Response

success
boolean
Indicates whether the authentication was successful
accessToken
string
JWT access token for authenticating API requests (expires in 30 minutes)
refreshToken
string
JWT refresh token for obtaining new access tokens (valid for 30 days)
user
User Object

Error Responses

{
  "error": "Email, and password are required.",
  "code": "auth/missing-fields"
}
{
  "error": "User not found.",
  "code": "auth/no-user-found"
}
{
  "error": "Invalid credentials.",
  "code": "auth/invalid-credentials"
}
{
  "error": "Incorrect password.",
  "code": "auth/wrong-password"
}
{
  "error": "Internal server error.",
  "code": "auth/server-error",
  "details": "<Error message>"
}

Notes

  • On success, an HttpOnly cookie named replyke-refresh-jwt is set.
  • The accessToken is 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