Having gone through the process of using Spring Boot to search files in OneDrive, Read the contents and Upload the files using the OneDrive API i am now stuck on the last part to create a shared link. My request on the wire looks like this:
POST /v1.0/me/drive/items/10E56B4B81156/createLink HTTP/1.1Accept: application/jsonContent-Type: application/jsonAuthorization:BearerEwB4A8l6BAAUO9chh8cJscQLmU+LSWpbnr0vmwwA...Content-Length:35Host: graph.microsoft.comConnection:Keep-AliveUser-Agent:Apache-HttpClient/4.5.12(Java/1.8.0_211)Accept-Encoding: gzip,deflate{view:"view",scope:"anonymous"}I am getting the following 400 error.
HTTP/1.1400BadRequest{error:{ code: invalidRequest, message:[actionParameters]One or more parameters of the operation 'createLink' are missing from the request payload.The missing parameters are: type., innerError:{ date:2020-07-22T08:31:17, request-id:17db09e1-0627-4407-98de-74a0ff794b6a}}}
According to the documentation on OneDrive API I got my request all sorted out I am unsure as to why this error is happening.