任何高級會員都可以獲得“/webhook”訪問令牌。 單個令牌可用於為多個記錄註冊 webhook。 要獲得令牌,您可以調用 ORCID API 令牌端點。
此過程通常稱為客戶端憑據 OAuth 流程,或 2 步 OAuth。
下面是獲取訪問令牌的示例調用 - 用您的憑據替換佔位符(確保刪除括號。)
curl -i -L -H "Accept: application/json"
-d "client_id=(your client ID)"
-d "client_secret=(your client secret)"
-d "scope=/webhook"
-d "grant_type=client_credentials"
"https://sandbox.orcid.org/oauth/token"
然後,您將收到類似於以下內容的訪問令牌。
{"access_token":"5eb23750-1e19-47a3-b6f6-26635c34e8ee",
"token_type":"bearer",
"refresh_token":"c7d3d5fd-e4c0-4825-89f2-7cfb4a1cf01e",
"expires_in":631138518,
"scope":"/webhook"}