使用此端點檢查已驗證的使用者是否可以執行指定動作。關於可能的 {{permission}}
值,請參閱詞彙 – 權限。
您可以附加 /{{user_id}}
到此端點,以檢查指定的使用者帳戶的權限。
curl -X GET \
https://www.digicert.com/services/v2/authorization/view_orders \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v2/authorization/view_orders"
payload = ""
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json"
}
response = requests.request("GET", url, data=payload, headers=headers)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/authorization/view_orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
var request = require("request");
var options = { method: 'GET',
url: 'https://www.digicert.com/services/v2/authorization/view_orders',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"authorized": true,
"permission": "view_orders"
}
名稱 | 類型 | 說明 |
---|---|---|
authorized | bool |
說明使用者是否獲得執行動作的授權。 可能的值: true ,false
|
permission | string |
權限動作。 請參閱詞彙 — 權限 |