重新整理存取憑證

您可以透過此端點重新整理長期Instagram 用戶存取憑證

不公開 Instagram 帳戶的長期存取憑證現在可以重新整理。另外,擁有不公開帳戶的應用程式用戶向應用程式所授予的權限有效期現為 90 日。

建立

我們並不支援這項操作。

讀取

GET /refresh_access_token

重新整理至少已產生 24 小時但並未過期的長期Instagram 用戶存取憑證。重新整理後,憑證的有效期為重新整理當日起計 60 日。

必要條件

要求語法

GET https://graph.instagram.com/refresh_access_token
  ?grant_type=ig_refresh_token
  &access_token={long-lived-access-token}

查詢字串參數

包含以下查詢字串參數以擴充要求。

密鑰

grant_type
必填項目
字串

將此設定為 ig_refresh_token

access_token
必填項目
字串

您要重新整理的有效(未過期)長期Instagram 用戶存取憑證

回應

包含下列屬性和值的 JSON 格式物件。

{
  "access_token": "{access-token}",
  "token_type": "{token-type}",
  "expires_in": {expires-in}
}

回應內容

值的預留位置

{access-token}
數字字串

長期 Instagram 用戶存取憑證。

{token-type}
字串

bearer

{expires-in}
整數

長期憑證到期之前的秒數。

cURL 範例

要求

curl -X GET \
  'https://graph.instagram.com/refresh_access_token?grant_type=ig_refresh_token&&access_token=F4RVB...'

回應

{
  "access_token": "c3oxd...",
  "token_type": "bearer",
  "expires_in": 5183944
}

更新

我們並不支援這項操作。

刪除

我們並不支援這項操作。