Skip to content

User authentication

Send pin code

mutation ($email: String!, $via: SendVia!, $brand: String) {
  sendPinCode(
    email: $email,
    sendVia: $via,
    brand: $brand
  )
}

get that pin code and enter here

mutation($email: String!, $pin: String!, $device: String!, $host: String!) {
  checkPinCode(
    email: $email,
    pin: $pin,
    device: $device,
    host: $host
  ) {
    token,
    tokenId,
    result
  }
}

That will return token/password you can use to login

POST https://rest.weave.io/session
{
    "email": YOUR_EMAIL,
    "password":<token VALUE FROM ABOVE>,
    "uid": <tokenId VALUE FROM ABOVE>,
    "credential": "Token",
    "transport": "headers"
}

You'll get something like

{
  "Set-Authorization": "auth token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "result": "ok",
  "Set-Refresh-Token": "xxxxxxxxxxxx",
  "uid": "xxxxxxxxxxxx",
  "message": "Login successful",
  "Set-Cookie": "XSRF-TOKEN=xxxxxxxxxxxx Path=/"
}

That will return you auth tokens which you can use as Headers if you want to exec query that required auth e.g. graphql

query {
    checkSession{
        message
        status
        statusCode
    }
}