使用httr包...我试图在线访问excel表...使用以下命令:
resp <- POST("https://graph.microsoft.com/v1.0/me/drive/items/{45B5B145-0A1C-43B8-BF67-97B5EC21AD13}/workbook/createSession", add_headers("Content-Type" = "application/json",authorization = "Bearer {access-token}"))
但是我收到以下错误:
$error
$error$code
[1] "InvalidAuthenticationToken"
$error$message
[1] "CompactToken parsing failed with error code: -2147184105"
$error$innerError
$error$innerError$`request-id`
[1] "538743c2-a0d9-451b-ba8c-5e59bcd1330f"
$error$innerError$date
[1] "2017-05-23T09:02:43"
我按照Microsoft Graph上的以下文档在线访问Excel工作表:https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/excel
在此,下面的休息调用是为了访问工作表:
POST/{version}/me/drive/items/01CYZLFJGUJ7JHBSZDFZFL25KSZGQTVAUN/workbook/createSession
content-type: Application/Json
authorization: Bearer {access-token}
{ "persistChanges": true }
如何使用httr包的POST函数进行上述休息调用以避免上述错误并访问表单?