重新整理存取權杖

此端點允許您重新整理長期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}
Integer

長期權杖到期之前的秒數。

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
}

更新

不支援執行此作業。

刪除

不支援執行此作業。