caronc / apprise

Apprise - Push Notifications that work with just about every platform!
https://hub.docker.com/r/caronc/apprise
BSD 2-Clause "Simplified" License
10.94k stars 385 forks source link

Notifiarr wiki docs are unclear #999

Closed jeffbyrnes closed 7 months ago

jeffbyrnes commented 7 months ago

:mega: Notification Service(s) Impacted

:lady_beetle: Describe the bug

The wiki docs for Notifiarr aren’t quite as clear as they could be.

:bulb: Screenshots and Logs

See morpheus65535/bazarr#2292 for some screenshots & logs exemplifying these behaviors.

:computer: Your System Details:

n/a

:crystal_ball: Additional context

The wiki docs mention that you need a Notifiarr API key, but Notifiarr has a “global” API key, and integration-specific ones. Apprise needs the global key to work properly.

Additionally, while the wiki docs mention using a Discord channel ID, the examples provided use a channel name, which is confusing.

Here’s the entire wiki doc source Markdown, with adjustments made to clarify these these:

## Notifiarr Notifications
* **Source**: https://notifiarr.com
* **Icon Support**: No
* **Attachment Support**: No
* **Message Format**: Text
* **Message Limit**: 32768 Characters per message

### Account Setup
You need to first set up an account with [Notifiarr](https://notifiarr.com) if you don't have one already.  From there you can generate yourself your `{api_key}`. You will need to use your “global” API key, the integration-specific Notifiarr API keys do not work with Apprise.

### Discord Channel IDs
To use Notifiarr, you need your Discord ChannelID.  **It must be the numeric version of it**.  [Here is some great instructions on how to get it](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-).

In short:
-  **Enable Developer Mode** by visiting your _Discord Settings_ and going to **Appearance**.
- 

### Syntax
Valid syntax is as follows:
- `notifiarr://{api_key}/{channel_id}`
- `notifiarr://{api_key}/{channel1_id}/{channel2_id}/{channelN_id}`

### Parameter Breakdown
| Variable     | Required | Description                                                                                                                             |
| ------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| api_key      | Yes      | Your global (not integration-specific) Notifiarr API Key                                                                                |
| source       | No       | Optionally provide the source of the notification as a descriptive string (you can also use `from` as an alias to this same variable)   |
| event        | No       | Optionally specify the Notifiarr Event ID you want your notification update. If none is specified, then a new notification is generated |
| discord_user | No       | Optionally specify the Discord User ID you wish to Ping via Notifiarr                                                                   |
| discord_role | No       | Optionally specify the Discord Role ID you wish to Ping via Notifiarr                                                                   |

#### Example
Send a discord notification:
```bash
# Assuming our {APIKey} is 4174216298
# Assuming our {ChannelID} is 123456789
# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
"notifiarr://4174216298/123456789"

```

If you have a Discord Event ID you wish to reference, you can do the following:
```bash
# Assuming our {APIKey} is 4174216298
# Assuming our {ChannelID} is 123456789
# Assuming our {EventID} is 1234
# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
"notifiarr://4174216298/123456789?event=1234"

```
caronc commented 7 months ago

Thank you! :pray: I applied everything you just shared! Is there anything else you think I should add to to help make things easier? :rocket:

jeffbyrnes commented 7 months ago

Awesome, thanks @caronc! I wonder if there is some way that the integration-specific API key could be used? But that might be tricky, since Apprise is a library & can be used by all sorts of apps.

caronc commented 7 months ago

Well there is already support in Apprise for Discord (see here). So to use the notifiarr:// trigger, it's only the API keys associated with it that will work.

I'm not sure if that's what you're asking?

jeffbyrnes commented 7 months ago

Sorry for the confusion; Notifiarr has, internal to its own workings, a concept of an “integration specific API key”. So you can create an API key and it only receives requests from Radarr, or Sonarr, or GitHub, etc.

I’ll hazard a guess that, since Apprise isn’t a specific app, but instead a library that can be included in other apps (like Bazarr, which is my use case), these Notifiarr-integration-specific API keys aren’t something that can be used.

So I think you’ve done all you can here! This is great, and should help the next person after me get set up more easily 🙂