0

So I managed to connect to the websocket with my API token and I do get notifications. For incoming calls, I do get a push with all info like so:

{"type":"push","targets":["stream"],"push":{"type":"mirror","source_device_iden":"XXXXXXX","source_user_iden":"ujC7S24sQxw","client_version":206,"dismissible":true,"title":"5555551212","body":"Incoming call","application_name":"Pushbullet","package_name":"com.pushbullet.android","notification_id":"6","icon" "Big value here"}}

So I can see that call came from 555-1212 (I changed number for privacy) and it all makes sense. However, for SMSs, all I get is a notification that SMS changed. No body field so I can't see where it came from and what the message is. All it says is sms_changed for type:

{"type":"push","targets":["stream"],"push":{"type":"sms_changed","source_device_iden":"XXXXXXXXX"}}

What am I doing wrong? I would like to get the SMS message and sender info so that I can publish it. Any and all help will be greatly appreciated.

Anand S Kumar
  • 88,551
  • 18
  • 188
  • 176

1 Answers1

0

This is not publicly documented yet and we might be changing the implementation in the near future so I'm hesitant to make it public. Also I don't know the specifics of the current implementation.

You can view how it works right now by using www.pushbullet.com and looking at the network traffic (in chrome inspector) when you do SMS stuff on the website.

Chris Pushbullet
  • 1,039
  • 9
  • 10
  • That is pretty much what I did and all I see for these is a type: sms_changed. No body or anything like that. Any ideas? – Yevgeniy Brailovsky Oct 20 '15 at 21:12
  • Yeah, there should be requests to like /v2/permanents or something along those lines, which is where SMS data is currently stored. – Chris Pushbullet Oct 21 '15 at 17:22
  • This stuff will almost certainly be changed in the future and any programs using it are likely to break, so be warned. – Chris Pushbullet Oct 21 '15 at 17:26
  • I am fine with this not being permanent and when it breakes, I can adjust the code. I just want to get something going for now. I did try v2/permanents and get an invalid request: {"error":{"type":"invalid_request","message":"The resource could not be found.","cat":"~(=^‥^)"}} What am I doing wrong here? Here is what I request: curl --header 'Access-Token:xxxMyAccessTokenxxx' https://api.pushbullet.com/v2/permanents – Yevgeniy Brailovsky Oct 21 '15 at 19:02
  • You need to provide the id of the permanent, I don't know what they are because they are determined client side :/ You'll have to determine it from the requests the website makes. I think that's the only part you are missing though. – Chris Pushbullet Oct 22 '15 at 00:34