Skip to content
FacebookYouTubeX (Twitter)

Authentication

Allows to authenticate an agent using email and password.

NameTypeDescription
Content-Typestringuse “application/json” value
NameTypeDescription
emailstringthe user email address
passwordstringthe user password
{
  "success": true,
  "token": "JWT XYZ",
  "user": {
    "_id": "5ab11c6b83dc240014d46095",
    "email": "user@example.com"
  }
}

Allows a user to authenticate anonymously on the system.

NameTypeDescription
Content-Typestringuse “application/json” value
NameTypeDescription
id_projectstringthe project to which the user belongs
firstnamestringthe user firstname
lastnamestringthe user lastname
emailstringthe user email
attributesobjectthe user custom attributes
{
  "success": true,
  "token": "JWT XYZ",
  "user": {
    "_id": "5e25944ecf6bcc00178e75fa",
    "email": "user@example.com",
    "emailverified": false,
    "createdAt": "2020-01-20T11:51:42.115Z",
    "updatedAt": "2020-01-20T11:51:42.115Z",
    "__v": 0
  }
}

Allows to authenticate with a custom JWT token.

NameTypeDescription
AuthorizationstringCustom JWT Authorization token.
{
  "success": true,
  "token": "JWT eyJ0eXYZ",
  "user": {
    "_id": "123456",
    "firstname": "Andrea",
    "lastname": "Leo",
    "email": "user@example.com",
    "code": "123456",
    "sub": "userexternal",
    "aud": "https://pingstreams.com/projects/5ec688ed13400f0012c2edd1",
    "iat": 1598865103,
    "exp": 1598865223
  }
}
curl 'https://api.pingstreams.com/v3/auth/signinWithCustomToken' \
  -X 'POST' \
  -H 'authorization: JWT eyJ0eXAiOiJKVXYZZ....ZZZZZ'

You can find here How to Generate a Custom Authentication Token