1. Visit https://www.pushbullet.com/ and register with your Google-Account
2. Install Pushbullet App (iPhone or Android)
3. Visit https://www.pushbullet.com/account and get Access Token (e.g. G8aldIDL93ldFADFwp9032ADF2klj3ld)
4. Include your Access Token & Run Test Script
Example: Push to a device [Note] (Title & Body)
Code: Select all
PB_Token := "G8aldIDL93ldFADFwp9032ADF2klj3ld"
PB_Title := "Test Push (Note)"
PB_Message := "Test Message Pushbullet meets AutoHotkey"
MsgBox % PB_PushNote(PB_Token, PB_Title, PB_Message)
PB_PushNote(PB_Token, PB_Title, PB_Message)
{
WinHTTP := ComObjCreate("WinHTTP.WinHttpRequest.5.1")
WinHTTP.SetProxy(0)
WinHTTP.Open("POST", "https://api.pushbullet.com/v2/pushes", 0)
WinHTTP.SetCredentials(PB_Token, "", 0)
WinHTTP.SetRequestHeader("Content-Type", "application/json")
PB_Body := "{""type"": ""note"", ""title"": """ PB_Title """, ""body"": """ PB_Message """}"
WinHTTP.Send(PB_Body)
Result := WinHTTP.ResponseText
Status := WinHTTP.Status
return Status
}
Spoiler
Example: Push to a device [Checklist] (Title, Items)
Spoiler
Pushbullet APIs:
- /v2/pushes - Push to a device/user or list existing pushes.
- /v2/devices - List or create devices that can be pushed to.
- /v2/contacts - List your Pushbullet contacts.
- /v2/subscriptions - Channels that the user has subscribed to.
- /v2/users/me - Get information about the current user.
HTTP Status Code
- 200 OK - Everything worked as expected.
- 400 Bad Request - Usually this results from missing a required parameter.
- 401 Unauthorized - No valid access token provided.
- 403 Forbidden - The access token is not valid for that request.
- 404 Not Found - The requested item doesn't exist.
- 5XX Server Error - Something went wrong on Pushbullet's side.
Have fun & feel free to add more functions or create a complete class