Send private messages with add-on

Mikhail Vasilyev May 12, 2016

Hi!

 

Is there any way add-on can send private message to user (containing sensitive or private data, for example)?

Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Anatoli
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 12, 2016

Hi Michael,

You can send a message on users behalf – a user can authorize your add-on via 3LO Auth. You can also create a dedicated user for your add-on and have that user to send direct messages.

Mikhail Vasilyev May 12, 2016

I tired to do as follows.

 

When add-on installed, programmatically (POST /v2/user) create a "bot" user and add him to group. But then, how can I obtain (programmatically) access token to send messages on this bot's behalf? I can't figure out if this even possible. I think it's not.

Anatoli
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 18, 2016

Hi Mikhail, it is possible.

When you create the 'bot' user set its username and password and then you can generate token using the 'password' grant: https://www.hipchat.com/docs/apiv2/method/generate_token .

Mikhail Vasilyev May 18, 2016

Yes, looks like solution. Thank you so much!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events