question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No user was specified; using "Apprise" and config question via rest api

See original GitHub issue

Question I have been able to send a successful slack message but I get a warning in the UI i.e.

2021-10-23 05:11:45,367
WARNING
No user was specified; using "Apprise".
2021-10-23 05:11:45,367
INFO
Loaded 1 entries from memory://
2021-10-23 05:11:45,368
INFO
Notifying 1 service(s) asynchronously.
2021-10-23 05:11:45,597
INFO
Sent Slack notification.

My config (TEXT) is (xxxx replaced original slack tokens)

team=slack://xxxxxxxx/xxxxxxxx/xxxxxxxx Am I doing something wrong ?

2021-10-23_12-19-40

Also is there any config examples for using YAML rather than TEXT ?

Also, what is the format of the /add/{KEY} endpoint ?

I tried passing a complex object to “URLs” but it did not work, only works with a string.

But how can I specify the tags ?

For example…

Here is the /add/tester endpoint

{
    "urls": "slack://xxxxxxx/xxxxxxx/xxxxxxx"
}

And if I call into the json/urls/tester then I get (notice empty tags)

{
    "tags": [],
    "urls": [
        {
            "url": "slack://xxxxxxx/xxxxxxxxx/xxxxxxxxx//?image=yes&footer=yes&format=markdown&overflow=upstream&rto=4.0&cto=4.0&verify=yes",
            "tags": []
        }
    ]
}

For sure I am doing something wrong.

Of course, if I call the notify/tester endpoint without specifying a tag then the message is sent but if i specify a tag no message is sent - this is because I wasn’t able to setup a tag.

Sending a valid message - I get the warning returned in the response

2021-10-23 06:27:16,166 [WARNING] apprise: No user was specified; using “Apprise”. 2021-10-23 06:27:16,166 [INFO] apprise: Loaded 1 entries from memory:// 2021-10-23 06:27:16,166 [INFO] apprise: Notifying 1 service(s) asynchronously. 2021-10-23 06:27:16,399 [INFO] apprise: Sent Slack notification.

I also tried specifying the config on the /add endpoint but I get the format specified is invalid

i.e.

{
    "config": "team=slack://xxxxxx/xxxxx/xxxxx",
    "type": "text"
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
iangregsondevcommented, Oct 25, 2021

just calling the endpoint. Show you a curl,

curl --location --request POST 'https://my.domain.network/notify/stn' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "title": "Test title",
    "body": "test 1 2 3 4",
    "type": "failure",
    "tag": "alerts-lowest-priority"
}'

Here is a pic from postman and you can see the response.

image

BUT the message arrives to the provider, in my case for that tag - its slack.

1reaction
iangregsondevcommented, Oct 24, 2021

Ok finally figured it out, the clue was in the UI, there were some sample 😃 Doh! I must have missed it.

Closing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

caronc/apprise-api: A lightweight REST framework ... - GitHub
A lightweight REST framework that wraps the Apprise Notification Library ... Take advantage of Apprise through your network with a user-friendly API.
Read more >
First steps of sending alerts to Discord and others from syslog-ng ...
A returning question I get is: “I see, that you can send alerts from syslog-ng to Slack and Telegram, but do you happen...
Read more >
Spring Data REST: How to retrieve many items using list of Ids ...
I use to follow Spring Tools Suite suggestions (just type 'findBy' and press Ctrl+space in your JPA interface). – Jean Duarte. Nov 26,...
Read more >
How to set up push notifications in your Telegram bot
Of course, if you're planning to send notifications not only when the user interacts with the bot, you need to save chat_id in...
Read more >
API Status Codes - BigCommerce Dev Center
BigCommerce REST APIs and GraphQL APIs respond to each request with an HTTP ... also include an error message in the body to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found