Recently we've been receiving intermittent 401 Unauthorized HTTP Response status from the Shopify REST Admin API.
The requests are created by our Unlisted Shopify App and the erroneous responses are being returned for multiple standard and Shopify Plus stores using several different Shopify REST Admin API Endpoints.
The sequence of events is commonly several requests which return a 200 (or otherwise successful) HTTP Response status, then for no apparent reason a series of requests will return the 401 Unauthorized HTTP Response status, and at some point the issue disappears and the requests begin returning successful HTTP Response statuses again.
This happens with no apparent change on our end and some of the requests which are retried upon failure and will succeed on the second or third attempt. We have been unable to determine any logical pattern or reasoning as to why this is occurring - such as changes made to the Shopify App Scope.
Below are some x-request-id HTTP Header values and the URL Path used by impacted requests (which resulted in a 401 Unauthorized HTTP Response status), if additional information is needed to help diagnose I am more than happy to provide what I can.
42b30533-0d30-40f6-bcf9-61ce6f305d65 /admin/collects.json 259e432a-362e-419b-8951-b904bbf216fe /admin/metafields.json