Approve a CLI sign-in with the caller's own tenant, role, and scopes
POST
/
api
/
v1
/
cli
/
logins
/
{code}
/
approve
Approve a CLI sign-in with the caller's own tenant, role, and scopes
curl --request POST \
--url http://127.0.0.1:18000/api/v1/cli/logins/{code}/approve \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:18000/api/v1/cli/logins/{code}/approve"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:18000/api/v1/cli/logins/{code}/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/cli/logins/{code}/approve"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"login": {
"client_os": "<string>",
"client_version": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"device_name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"status": "pending",
"user_code": "<string>",
"decided_at": "2023-11-07T05:31:56Z",
"decided_by": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}⌘I
Approve a CLI sign-in with the caller's own tenant, role, and scopes
curl --request POST \
--url http://127.0.0.1:18000/api/v1/cli/logins/{code}/approve \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:18000/api/v1/cli/logins/{code}/approve"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:18000/api/v1/cli/logins/{code}/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/cli/logins/{code}/approve"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"login": {
"client_os": "<string>",
"client_version": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"device_name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"status": "pending",
"user_code": "<string>",
"decided_at": "2023-11-07T05:31:56Z",
"decided_by": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}