POST /login

Submit your login credentials to generate a session id which can be used for validating requests.

Tries to authenticate without system using the provided login credentials.

Body Required

  • login string Required
  • passwd string Required
  • remember string
  • g-recaptcha-response object
    Hide g-recaptcha-response attributes Show g-recaptcha-response attributes object
    • __v_isShallow boolean
    • dep object
      Hide dep attributes Show dep attributes object
      • w integer(int32)
      • n integer(int32)
    • __v_isRef boolean
    • _rawValue string
    • _value string
  • tfa string

    Two Factor Authentication Response.

Body Required

  • login string Required
  • passwd string Required
  • remember string
  • g-recaptcha-response object
    Hide g-recaptcha-response attributes Show g-recaptcha-response attributes object
    • __v_isShallow boolean
    • dep object
      Hide dep attributes Show dep attributes object
      • w integer(int32)
      • n integer(int32)
    • __v_isRef boolean
    • _rawValue string
    • _value string
  • tfa string

    Two Factor Authentication Response.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • sessionId string
    • account_id integer(int32)
    • account_lid string
    • ima string
    • gravatar string
  • 402 application/json

    Error response to a login request.

    Hide response attributes Show response attributes object
    • message string
    • field string
  • default

    Default response

POST /login
curl \
 --request POST 'https://my.interserver.net/apiv2/login' \
 --header "Content-Type: application/json" \
 --data '{"login":"user@domain.com","passwd":"mypassword","remember":"true","g-recaptcha-response":{"dep":{"n":0,"w":0},"_value":"zzzzz","__v_isRef":true,"_rawValue":"zzzzz","__v_isShallow":false}}'
curl \
 --request POST 'https://my.interserver.net/apiv2/login' \
 --header "Content-Type: multipart/form-data" \
 --form "login=user@domain.com" \
 --form "passwd=mypassword" \
 --form "remember=true" \
 --form 'g-recaptcha-response={"dep":{"n":0,"w":0},"_value":"zzzzz","__v_isRef":true,"_rawValue":"zzzzz","__v_isShallow":false}'
Request example
{
  "login": "user@domain.com",
  "passwd": "mypassword",
  "remember": "true",
  "g-recaptcha-response": {
    "dep": {
      "n": 0,
      "w": 0
    },
    "_value": "zzzzz",
    "__v_isRef": true,
    "_rawValue": "zzzzz",
    "__v_isShallow": false
  }
}
Response examples (200)
{
  "ima": "client",
  "gravatar": "https://gravatar.com/user/image.png",
  "sessionId": "zzzzzzzzzzzzzz",
  "account_id": 123,
  "account_lid": "my@user.com"
}
Response examples (402)
{
  "field": "2fa",
  "message": "missing 2fa"
}