How to use the addComment() method and specify user

Answered

Hi, I noticed that the addComment() method can take an optional "user" argument.

I would like to occasionally trigger comments from a sort of bot user, but am unable to do so and can't find documentation about the "addComment(string, User) method.

 

 

0
4 comments
Official comment

Hello Orrin, thanks for noticing it! We'll add this second argument to our documentation.

This `user` parameter is the user who will be the author of the comment. You can create a variable  with the username of your bot user, like this:

var bot = {user:[username]};

and then pass this variable as the second parameter in the addComment() method.

Please let us know if you have any questions. Thank you.

Avatar
Permanently deleted user

I've tried this but I get an authentication error if I pass any user other than the logged in user as the second value. Can you help me set up a bot user that does not require authentication?

0
Avatar
Permanently deleted user

@Liubov, are you able to assist?

0

Hello Orrin, I'm sorry for the delay in response. Could you please share the code that you're using? Also please attach a screenshot from the WF Editor with all the error messages visible.

Thanks!

0

Please sign in to leave a comment.