Look a sign-in up by its user code
curl --request POST \
--url https://api.tassyir.io/developer/cli/device/lookup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userCode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userCode: '<string>'})
};
fetch('https://api.tassyir.io/developer/cli/device/lookup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"userCode": "<string>",
"status": "pending",
"client": {
"id": "<string>",
"name": "<string>",
"version": "<string>"
},
"deviceName": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"origin": {
"country": "<string>",
"sameCountryAsYou": true
}
}
}{
"code": "BAD_REQUEST",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"requestId": "<string>"
}{
"code": "DEVELOPER_ACCOUNT_SUSPENDED",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"code": "CLI_CODE_NOT_FOUND",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"code": "PAYLOAD_TOO_LARGE",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"code": "CLI_SIGN_IN_RATE_LIMITED",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"path": "<string>",
"requestId": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"path": "<string>",
"requestId": "<string>"
}CLI sign-in
Look a sign-in up by its user code
The approval page’s route (dashboard JWT ONLY: a developer token can never approve a sign-in). The code travels in the body; dashes, spaces and case are ignored. An unknown, expired or someone else’s code is one answer, 404 CLI_CODE_NOT_FOUND. 10 approvals per user an hour; 10 wrong codes per user and 30 per IP an hour. Show what is asking (client, device name, when, the country it started from) before the developer decides.
Takes the dashboard session ONLY: a developer token is refused here, so a stolen CLI token can never approve a new sign-in.
POST
/
developer
/
cli
/
device
/
lookup
Look a sign-in up by its user code
curl --request POST \
--url https://api.tassyir.io/developer/cli/device/lookup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userCode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userCode: '<string>'})
};
fetch('https://api.tassyir.io/developer/cli/device/lookup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"userCode": "<string>",
"status": "pending",
"client": {
"id": "<string>",
"name": "<string>",
"version": "<string>"
},
"deviceName": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"origin": {
"country": "<string>",
"sameCountryAsYou": true
}
}
}{
"code": "BAD_REQUEST",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"requestId": "<string>"
}{
"code": "DEVELOPER_ACCOUNT_SUSPENDED",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"code": "CLI_CODE_NOT_FOUND",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"code": "PAYLOAD_TOO_LARGE",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"code": "CLI_SIGN_IN_RATE_LIMITED",
"message": "<string>",
"statusCode": 123,
"fix": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>",
"fix": "<string>"
}
],
"path": "<string>",
"requestId": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"path": "<string>",
"requestId": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"path": "<string>",
"requestId": "<string>"
}