OneDrive / onedrive-api-docs

Official documentation for the OneDrive API
MIT License
447 stars 228 forks source link

(Reopened) 429 - throttledRequest errors using /createLink endpoint after creating just a few links #1777

Open agfp opened 6 months ago

agfp commented 6 months ago

Category

Desired Behavior

1) I should be able to use the createLink endpoint after uploading a file. 2) If there's any kind of limit, this should be clearly documented.

Observed Behavior

This bug has been previously posted here: https://github.com/OneDrive/onedrive-api-docs/issues/1436

The createLink endpoint returns a 429 - throttledRequest error after ~12 requests.

Request:

POST /v1.0/drives/[REDACTED]/items/root:/[REDACTED]/[REDACTED]:/createLink HTTP/1.1
Accept: application/json
Authorization: [REDACTED]
Content-Type: application/json
Host: graph.microsoft.com
Content-Length: 35
Expect: 100-continue

{"scope":"anonymous","type":"view"}

Response:

HTTP/1.1 429
Transfer-Encoding: chunked
Content-Type: application/json
Retry-After: 3515
Strict-Transport-Security: max-age=31536000
request-id: 58ecbdc6-bb46-455e-a7a3-c42dfc12d651
client-request-id: 58ecbdc6-bb46-455e-a7a3-c42dfc12d651
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"Brazil South","Slice":"E","Ring":"3","ScaleUnit":"002","RoleInstance":"CP1PEPF00003698"}}
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01>;rel="deprecation";type="text/html"
Deprecation: Fri, 03 Sep 2021 23:59:59 GMT
Sunset: Sun, 01 Oct 2023 23:59:59 GMT
Date: Fri, 19 Jan 2024 07:38:23 GMT

F4
{"error":{"code":"accessDenied","message":"Too Many Requests","innerError":{"code":"throttledRequest","date":"2024-01-19T07:38:23","request-id":"58ecbdc6-bb46-455e-a7a3-c42dfc12d651","client-request-id":"58ecbdc6-bb46-455e-a7a3-c42dfc12d651"}}}
0

The following diagnostic traces were created on https://onedrive.live.com/?v=traceme: A81F7CCDD1E42362\2024-01-18_233326 and A81F7CCDD1E42362\2024-01-18_233329.

Steps to Reproduce

Create multiple (>10) shared read-only links via the API on a OneDrive Personal account.

Thank you.