Attachment Upload REST Message Returning 401 Unauthorized While Create and Update Methods Work Using
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Everyone,
We are working on a ServiceNow-to-ServiceNow incident integration.
The parent REST Message is configured with Basic Authentication. The authentication is working correctly for the child methods:
- Create Incident ✅
- Update Incident ✅
Both methods inherit authentication from the parent REST Message and execute successfully.
However, we recently added an Attachment Upload method under the same REST Message. This method should inherit the same authentication settings, but it is returning:
Additional observations:
- The attachment endpoint works when tested directly through REST API Explorer.
- The Scripted REST API returns HTTP 200 when tested independently.
- The log statement "UPLOAD ATTACHMENT API HIT" is never generated when the REST Message executes, which suggests the request may be failing before reaching the Scripted REST API.
- Endpoint URL and credentials have been verified.
- Since Create Incident and Update Incident are working with the same parent REST Message authentication, we do not believe the credentials themselves are incorrect.
Has anyone encountered a situation where child methods under the same REST Message inherit authentication differently, or where an attachment upload method returns 401 while other methods work successfully?
Any suggestions on logs, authentication settings, or method-level configurations that we should verify would be greatly appreciated.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
the same thing was done for create and update incident HTTP method too it was working but for upload attachment method authentication is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @jeevithr
Did you test it using Postman.
Can you share the screen shot of Http parameters under http request tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
scripted REST API endpoint
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
how are you sending the JSON request body to that scripted REST API endpoint?
what's the script within that?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏