question

Danielle Cox avatar image
Danielle Cox asked keithryanwong Deactivated edited

app install webhook - not triggering for install but is for uninstall

I have an app with almost no permissions (I actually have read employee). I tried to set up a webhook to capture app install events. It seems like I would only need to have an app, no other permissions. I have another app in sandbox that has read on merchant plus quite a few more.

I am not receiving an install event for the app that has no permissions. However, I do receive the uninstall event. (I receive both for the app with many permissions.) Is there a permission that is required to receive a webhook for installs? If there is, I would expect apply to uninstalls as well? Here is the dump of the DELETE action showing that I do have webhooks set up correctly.

Any ideas?
(    
   [appId] => 6WT0K0GXFGDWG
   [merchants] => Array (
       [N3AXMQYX96ZD0] => Array (
	  [0] => Array (
              [objectId] => A:6WT0K0GXFGDWG
              [type] => DELETE
              [ts] => 1519843929823
          )
   )
)<br>
Webhooks
4 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

keithryanwong avatar image keithryanwong commented ·

Please try the following steps if you still only have employee read permissions and you're only getting uninstall notifications (if you have a different setup now, please tell me what it is and what the symptoms are):

1. Uncheck subscriptions in your app's webhook settings and save (not your app permissions).

2. Go into your app permissions, check Merchant Read. Save.

3. Test. Please let me know what happens here.

4. Recheck permissions in your app's webhook settings. Wait a couple minutes.

5. Test.

Let me know if that works!

0 Likes 0 ·
Danielle Cox avatar image Danielle Cox commented ·

Sure - that works, I suspected as much. However, are you telling me that merchant read is required for the app install webhook, but not the app uninstall webhook? It is the same webhook, just a create event instead of a delete event. And I don't understand why I would need merchant read to receive that? I can log into Clover and see who has installed and who hasn't. I don't like having to add a permission to the app that I really don't need.

0 Likes 0 ·
Danielle Cox avatar image Danielle Cox commented ·

Also - if I add the permission, it will only be for the webhook, since my app never communicates back to me, so there is no access token to do anything else. I know, that a new permission doesn't take effect until an existing merchant uninstalls and reinstalls. What happens if they don't do that (which I don't want them to do) and I release a new APK. Does the permission mismatch cause any thing to happen at all? I don't want their clover devices to miss out on an update. I also don't want the install process to ask them anything. Ie, if I add that permission, I don't want it to affect the existing merchants at all or them to even notice I changed anything.

0 Likes 0 ·
keithryanwong avatar image keithryanwong Danielle Cox commented ·

Permissions are not tied to the apk. Your merchants will still receive updates. Like you said, the permissions wouldn't actually take affect until an uninstall/install, but in this case that's okay.

The application permissions shouldn't affect the webhook permissions at all, but currently they do seem to interact in unintended ways. The inconsistency you've noted could also be because of a server going down. We're currently looking into what the cause is and I'll update you accordingly. Thank you for your patience.

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community