Post

4 followers Follow
2
Avatar

Webhooks for messages/chats

Are there any plans for this? Is there a better way for me know (programmatically) that a user has a new message, other than to check every now and then?

Best regards,

Carl-Fredrik Herö

Elvenite AB, Podio Preferred Partner

Carl-Fredrik Herö

Please sign in to leave a comment.

18 comments

0
Avatar

Hi Carl-Fredrik,

We are not likely to implement webhooks for conversations as it wouldn't really be a good fit. You can however use our push service to get real-time notifications about conversations (and lots of other things). The bad news is that we don't have any public documentation yet. I'll write up some docs so you can look at it. :)

/Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

I can see that it could be very transaction heavy, I actually kind of "reverse engineered" your code a year ago for the push service in an attempt to build a desktop notifier using Adobe Air.

I would be very interested in your documentation though! :)

But please don't prioritize this Andreas too much, right not it's just for my own curiousity. I just setup an API user and it would be pretty cool to have it answer private messages. :)

Carl-Fredrik Herö 0 votes
0
Avatar

Hi Carl,

Any chance you could share some of that code?  I am trying to use chat as a way for a user to quickly add a related item without exiting the original item entry screen for a new item (of different app).

For example, user is in the middle of adding a Toolbox item and notices that the search for Tool (which is an app reference on Toolbox) does not return any items.  The user would like to quickly add a new Tool without exiting the current item entry.  Chat may be an easy way to solve this using really simple "Bots".

Thanks,

Jacob

Jacob Flatter 0 votes
0
Avatar

Podio seems to have changed some of the methods in their API because I can't get the signature tokens for establish a notification client.

Andreas, all I need is a method to get these signatures (for the push channels). Is that something you can give me?

Carl-Fredrik Herö 0 votes
0
Avatar

A year ago or so I used https://api.podio.com/device/push_subscriptions/ which I can't get to work any longer.

Try this: curl -H "Authorization: 'OAuth2 487e87{get-your-own-access_token}'" https://api.podio.com/device/push_subscriptions/

And you will get this:

{"error_parameters":{},"error_detail":null,"error_propagate":false,"request":{"url":"http:\/\/api.podio.com\/device\/push_subscriptions\/","query_string":"","body":null,"method":"GET"},"error_description":"No matching operation could be found. The path '\/device\/push_subscriptions\/' was not found..","error":"not_found"}

Notice the http, not https which is required and what I used. The method Get push subscriptions are not present any more on https://developers.podio.com/doc/mobile but at this snapshot it's there http://web.archive.org/web/20120121194737/https://developers.podio.com/doc/mobile

So something has for a fact changed. :) Wow it's fun to play Sherlock Holmes.

Carl-Fredrik Herö 0 votes
0
Avatar

We do move things around from time to time, I didn't know this went a year back. :)

These days you get the signature when you get an object you can subscribe to. E.g. if you get an app item it will have a "push" property with the signature and a few other things.

Does that help?

All the best,

Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

No worries! Thank you! This looks promising:

New message from /user/1549995

{ channel: '/user/1549995',

data:

{ event: 'conversation_event',

ref: { type: 'user', id: 1549995 },

data:

{ event_id: 3684663,

created_on: '2013-07-15 21:37:14',

settings: [Object],

conversation_id: 1020496,

text: 'hello',

total_unread_count: 1,

data: [Object],

action: 'message',

created_by: [Object],

unread_count: 1 },

created_by: { type: 'user', id: 618362 },

created_via: 1 } }

I will go about to build my own podio bot "hologram", it will answer some questions, and if it can't:  "I'm sorry, my responses are limited. You must ask the right questions."

This is awesome!

@Jacob I will clean up some code in the next few days and get back to you. Next week I start my vacation which mean I have a lot more time. :)

Cheers!

Carl-Fredrik Herö 0 votes
0
Avatar

@Carl,

That combination of "I think this is going to work" and "I can't wait to spend part of my vacation on this" is AWESOME!

Thanks for the effort, I will be patiently waiting.

Jacob

Jacob Flatter 0 votes
0
Avatar

@Andreas: It works great, but their seems to be a glitch in how messages are displayed. Take a look at the attachment. The response without heading is not from me, if I refresh the page "his" name is displayed correctly.

Carl-Fredrik Herö 0 votes
0
Avatar

The response might come back so fast that the UI gets confused. Can you try having your bot sleep for 5 seconds before responding?

Andreas Haugstrup Pedersen 0 votes
0
Avatar

I filed a bug on our end so we'll see if we can't get the issue fixed. You can probably lower your bot's sleep time to 1 second. I just wanted to confirm that was really the issue.

Andreas Haugstrup Pedersen 0 votes
0
Avatar

Luke: What code are you interested in? The node js bot who can reply to messages? It's **VERY** simple with a single reply every time. But perhaps something to build upon. I tried to have it create an item if the message was in a specific format but it didn't work as expected and I haven't had the time to work on it any more.

Carl-Fredrik Herö 0 votes
0
Avatar

I would love to have this re-assessed from the Podio team.

The option to make Bots that can communicate with users using conversation in Podio would be beneficial - especially now that you can have the Podio Chat app installed.... Also - a conversation could be connected to other fora this way.

The API already offer the option of writing and reading to conversations now, but a webhook is required for automating any processes.

So Pleeeease!! Reconsider make a webhook for conversations....

Gustav Sverre Kampp 0 votes