Attachment REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2020 10:14 AM
Hello community,
How can we send base64 encoded file using Attachment API?
I have used binary present in Body using POSTMAN and REST API Explorer by selecting a file. it worked fine.
But we need to achieve it by sending a base64 encode into the servicenow using Attachment API.
When I tried a docx file encoded Base64 in body content, the file got attached to incident but when tried to open the attachment, got an error stating 'contents are invalid'.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2020 10:48 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2020 12:46 PM
Hi,
Before uploading the attachment you need to decode and then write the attachment file. If you have to send the attachment to any 3rd party then you shall use base 64 encoding.
Mark the comment as a correct answer and also helpful once worked.