User account making batch REST API requests from external application: DELETE method subrequests work in Sandbox but not Production

Issue: When an external application sends a request to the REST API Batch resource on Production, DELETE methods return 401 unauthorized. The user is a System Admin. When Sandbox user does a send, DELETEs are successful in the batch request.

The odd thing is that we are only having issues with DELETE method, not with GET, PATCH, etc methods. The token can't be invalid because GET & PATCH wouldn't work if it was.

Troubleshooting steps we’ve performed:

  • Verified user account is system administrator. Profile and
    permissions are matching between Sandbox and Production.
  • Verified session ID or OAuth token used has not expired nor is invalid.
  • Verified correct protocol (using HTTPS not HTTP).
  • Are they hitting the correct endpoint or did they forget to change it from sandbox to production?
    – Eric
    Sep 19 '16 at 14:59
  • They confirmed they are hitting the correct endpoint. Further troubleshooting was going into workbench as the prod user and trying a delete against a test record; delete was successful.
    – CSEvSp6
    Sep 20 '16 at 22:31

Going to answer my own question in case anyone else encounters the same issue. The answer is: The issue self-resolved. We confirmed it wasn't an issue in Salesforce and re-deploying didn't work. We just came in this morning and batch delete requests started working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.