/login/raw
Raw login method
This endpoint is the simplest way to login into your Siga 3 account. When logged it will return the Siga 3 server it's using, the Siga session cookie, your client session cookie, and a logged variable equal to true meaning you successfully logged into your Siga 3 account.
Load the Siga
This method requires u to have a loaded Siga session:
If you need or want to log in using captcha, u need to load a Siga session with captcha data:
Load Siga session with captcha
With the Siga session loaded, you should have the following values:
challengeThe challenge hash.captchaWill benullif loaded without captchaidCaptcha identifiernumbersAn array of the captcha valuestipA tip on what to do with the captcha values
serverBase Siga URL given by Siga's load balancersigaSiga session idclientMySiga session id
Encrypting the password
This login method doesn't accept the user password, u have to encrypt the password using the given challenge hash and use the generated hash to log in. This is the way to do it:
MD5(user : MD5(password) : challenge)$cpf = '12345678901';
$password = '12345678';
$challenge = '1816466375646a6b2518ae6';
$response = md5($cpf.':'.md5($password).':'.$challenge);
// response will be like: 2717466375646a6b8518ae7Raw Authentication
POST https://mysiga.laravieira.me/login/raw
This will get the CPF and the response and login into Siga server.
Cookies
PHPSESSID*
string
The session id
Request Body
cpf*
string
The user CPF, only numbers
response*
string
The encrypted password
captcha
int
The captcha resolution
{
"server": "*",
"siga": "*",
"client": "*",
"logged": true
}server Base URL to the Siga 3 server selected by Siga's load balancer.
siga Siga session id.
client Session id of MySiga API.
logged If the user was logged in, is always true and only exists on the 200 response code.
The value to the CPF field is missing or not a valid CPF.
{
"code": 400,
"message": "No valid CPF.",
"uri": "/login",
"server": null,
"siga": null,
"client": "*",
"docs": "https://docs.laravieira.me/mysiga",
"date": "Sun, 21 May 2023 13:41:34 -0300"
}The given value to the response field is not valid or is missing.
{
"code": 400,
"message": "No valid response.",
"uri": "/login",
"server": null,
"siga": null,
"client": "*",
"docs": "https://docs.laravieira.me/mysiga",
"date": "Sun, 21 May 2023 13:45:50 -0300"
}The given captcha resolution is not valid.
{
"code": 400,
"message": "No valid captcha.",
"uri": "/login",
"server": null,
"siga": null,
"client": "*",
"docs": "https://docs.laravieira.me/mysiga",
"date": "Sun, 21 May 2023 13:41:34 -0300"
}With this raw login method, u need to load Siga using Load Siga session to only then try to log in.
{
"code": 424,
"message": "You need to load a siga session before trying login.",
"uri": "/login",
"server": null,
"siga": null,
"client": "*",
"docs": "https://docs.laravieira.me/mysiga",
"date": "Sun, 21 May 2023 13:41:34 -0300"
}With this raw login method, u need to load Siga using Load Siga session with captcha to only then try to log in with captcha.
{
"code": 424,
"message": "You need to load a siga captcha before trying login with it.",
"uri": "/login",
"server": null,
"siga": null,
"client": "*",
"docs": "https://docs.laravieira.me/mysiga",
"date": "Sun, 21 May 2023 13:41:34 -0300"
}Last updated