Sending notifications from VBA scripts in Outlook?
  • I'm trying to get notifications set up via Outlook similar to a post I found here for Prowl: http://bubba.org/index.php?id=461091729996829223. It seems I can authenticate correctly, but I keep receiving errors of "Not allowed to send to user". I've tested the same string using a basic curl example as in the API docs. Am I missing something glaringly obvious?

    Strings in "[]" are filled with the appropriate values, of course.

    Public Sub NotifoBroadcast()
    Dim usernames As Variant
    Dim curUsername
    Dim RequestString

    usernames = Array("[SUBSCRIBED_USER1]", "[SUBSCRIBED_USER2]")

    For Each curUsername In usernames
    Set oHTTP = CreateObject("Microsoft.XMLHTTP")
    user = "[SERVICE_USER]"
    apikey = "[APIKEY]"
    URL = "https://api.notifo.com/v1/send_notification"
    RequestString = "to=" & curUsername & "&msg=Message"
    oHTTP.Open "Post", URL, False
    oHTTP.setRequestHeader "Authorization", "Basic " + "[BASE_64_ENCODED_CREDENTIALS]"
    oHTTP.Send RequestString
    Result = oHTTP.responseText
    MsgBox Result
    Set oHTTP = Nothing
    Next curUsername
    End Sub

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership