I am uploading attachments using api/content/{id}/child/attachment route via node js. Uploading to pages or blog posts works like a charm but when I try to upload attachment to a comment with the same code i receive {"statusCode":500,"message":"","reason":"Internal Server Error"} as a response. What can be the reason? Can we upload attachments to comments using REST API in general? If yes, I can provide more details about how I make request
Hi @Daria Kozhemiakina welcome to the community. I tried doing this but get 403 response with below error -
"message":"User not permitted to create attachments for content: ContentId{id=123456}","reason":"Forbidden"}
As per the REST API documentation -
Hello @Kishan Sharma
Thank you for an answer, but unfortunately I am not sure if it is relevant to the situation. Do you have permissions to add a comment by the user you authorized to use an api? 403 error according to Confluence api docs means that you don't have rights to perform an action. While my error is 500 with no explicit info in message ;(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Daria Kozhemiakina . Yes I do have permissions to add comment to the page where i am trying to add a comment + attachment. Somehow I am unable to get through it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kishan Sharma Got it, thank you
Are you able to add attachments to pages or blogposts in the same way or receive 402 too?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Daria Kozhemiakina i was able to add an attachment to a page, without any error. Are you getting any issues while adding attachment to a page ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kishan Sharma Nope. I can add to pages and to blogposts also, but when I try to add an attachment to the comment - 500 error, when with GUI(confluence itself) it is possible to add attachments to comments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.