1
問題
封裝httr
提供中的R CURL包裝(參見package documentation)。使用的OAuth2.0令牌,其中R的HTTR包
我是全新的HTTP和API。我的麻煩是獲得oauth2.0認證工作。我曾嘗試過各種語法規範,並得到錯誤或狀態401
什麼是使用的OAuth2.0令牌,並使用httr
一個GET()
請求的正確方法是什麼?
代碼試圖
# Set UP
url = "https://canvas.{institution}.edu/api/v1/courses"
key = "{secret_key}"
# 1
GET(url, sign_oauth2.0(key))
# Error: Deprecated: supply token object to config directly
# 2
GET(url, config(sign_oauth2.0 = key))
# unknown option: sign_oauth2.0
# 3
GET(url, config = list(sign_oauth2.0 = key))
# Status 401