Start a CLI sign-in (RFC 8628 §3.1)
curl --request POST \
--url https://api.tassyir.io/developer/cli/device-code \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data client_id=tassyir-cli \
--data 'client_version=<string>' \
--data 'device_name=<string>' \
--data locale=enconst options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
client_id: 'tassyir-cli',
client_version: '<string>',
device_name: '<string>',
locale: 'en'
})
};
fetch('https://api.tassyir.io/developer/cli/device-code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"device_code": "<string>",
"user_code": "<string>",
"verification_uri": "<string>",
"verification_uri_complete": "<string>",
"expires_in": 4503599627370496,
"interval": 4503599627370496
}{
"error": "invalid_client",
"error_description": "<string>"
}{
"error": "invalid_request",
"error_description": "<string>"
}{
"error": "slow_down",
"error_description": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"path": "<string>",
"requestId": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"path": "<string>",
"requestId": "<string>"
}CLI sign-in
Start a CLI sign-in (RFC 8628 §3.1)
Print user_code, open verification_uri_complete (it only pre-fills the code: the developer approves on the page, signed in to the dashboard), then poll POST /developer/cli/token every interval seconds. 10 sign-ins per IP every 10 minutes. Errors are OAuth’s { error, error_description }.
Public: the CLI holds nothing yet.
POST
/
developer
/
cli
/
device-code
Start a CLI sign-in (RFC 8628 §3.1)
curl --request POST \
--url https://api.tassyir.io/developer/cli/device-code \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data client_id=tassyir-cli \
--data 'client_version=<string>' \
--data 'device_name=<string>' \
--data locale=enconst options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
client_id: 'tassyir-cli',
client_version: '<string>',
device_name: '<string>',
locale: 'en'
})
};
fetch('https://api.tassyir.io/developer/cli/device-code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"device_code": "<string>",
"user_code": "<string>",
"verification_uri": "<string>",
"verification_uri_complete": "<string>",
"expires_in": 4503599627370496,
"interval": 4503599627370496
}{
"error": "invalid_client",
"error_description": "<string>"
}{
"error": "invalid_request",
"error_description": "<string>"
}{
"error": "slow_down",
"error_description": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"path": "<string>",
"requestId": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"path": "<string>",
"requestId": "<string>"
}Body
application/x-www-form-urlencodedapplication/json
Form-encoded (application/x-www-form-urlencoded, parsed flat) or a flat JSON object: at most 8 KB and 20 parameters, every value one string of at most 4,096 characters, a parameter sent twice refused (invalid_request).
Response
The codes.
RFC 8628 §3.2: the device authorization response.