The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way that we can add comments with custom author using APIs?

Laxman Khokhar
August 6, 2024

We are using below listed APIs to add comments but it is getting author from auth token while adding comments, so is there any way that we can use custom author instead of auto assigning author from auth token.

Version 3 :

 

https://yourdomain/rest/api/3/issue/ABC-7322/comment

 

Version 2 :

https://yourdomain/rest/api/2/issue/ABC-7322/comment

Request Payload :

Basic Auth Token Detail : UserName : abc : AuthToken : fghdjwedkjebd

 

{
    "body" : "This is a test comment",
    "author": {
            "self": "",
            "accountId": "accountId",
            "emailAddress": "test@test.com",
            "avatarUrls": {
                "48x48": "",
                "24x24": "",
                "16x16": "",
                "32x32": ""
            },
            "displayName": "Jira Integration",
            "active": true,
            "timeZone": "America/Los_Angeles",
            "accountType": "atlassian"
        }
}

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Anandhi Arumugam _Cprime_
Community Champion
August 7, 2024

Hi @Laxman Khokhar Currently, the API sets the user who is Authenticating as the Comment Author. We cannot customise it. Hope this helps.

Laxman Khokhar
August 7, 2024

Ok thank you.

Anandhi Arumugam _Cprime_
Community Champion
August 7, 2024

Please accept the answer so we can close this out :)

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events