-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group Key not working #3
Comments
The module is always submitting the following parameters in the POST:
When using a group key, the API expects to only have a single device in the JSON message. That means, you can only have one contact in the roster with the proper device name. Their documentation states this:
My guess is you are sending to a single Team-owned group so the device is not ignored. Probably, just need to get the device correct (which is on the Security > Users, Roles > Contact Info. I would just create a contact for the Team. In the meantime, I can certainly add some more logging to the module. Let me know. |
I am attempting to use a Team Group. I guess I'm just confused as to what is supposed to go where - particularly because I don't want to use devices - I only want to use the Group. |
Can you post an example of the HTTP POST that works in Postman? |
Thought I sent this... opened Postman and it was still showing like this! Anyway: apiKey is from a team-owned Application |
Yeah in your example you didn't specify device as a parameter. The module is forcing the parameter right now. What happens if you add that into Postman and leave the value blank? |
I'm actually surprised - I expected this to fail, but it didn't
It still works with the "=" and no value: In an effort to break it... this did not work: Testing some more... when I used a user key, this worked. With a group key it did not. Personally, I'd call this a bug on their end. It appears that "device" is acting like a filter for a group? I have a group with myself and one other user. My device name is "iPhone", his is "galaxys22". With the same api and group key, I can send to only one device or the other by specifying the device name. If I put an invalid device name (including null!), it fails. Would be nice to have the option to use a Group Key on the setup page or make use of the User Keys and Device Names on the user setup. Personally, I don't think I would ever use that - if someone gets a new phone, or wants to get notifications on their computer, I don't want to have to change the user setup. Maybe you could do this: on the Notifcation Profile page - API Token is always required. Then ask for the User Key type - either User or Group. If it's a Group, you can enter the Group Key, and any time that profile is used, there is one API call to Pushover. If they pick User, then I think you also need to change the User Contact - that would require a User Key and optionally a Device ID, and when that profile is called, I think it would be an API call for each user. A co-worker pointed out your new API module. I haven't looked at it yet, but wondering if that may be a better fit for my use case. Let me know if there's anything I can do! |
Stumbled across this the other day and love the potential... worked perfectly for me, fell on my face when I tried to deploy it!
When setting up the Ignition > Notification, I put my own User Key - everything worked fine.
I also have the User Keys setup under Security > Users, Roles > Contact Info, although I'm not sure where these are used...
I then replaced my User Key with a Group Key. When I trigger the notification again, I got: Error sending notification: status code=400, response=Bad Request
Both of the above scenarios work via Postman.
Would be great if you could see the POST request in the Logs when in "Log Only" mode for troubleshooting.
The text was updated successfully, but these errors were encountered: