Delete a trigger
  • I am creating triggers for individuals users because I need to use a user-specific callback URL. So when the user turns on geofencing for a specific place I create the trigger. However, if they turn it off, I need to delete the trigger. When I try to delete the trigger from my app using the api I receive "Access denied to this trigger".

    What is the best way to delete a trigger?
  • 4 Comments sorted by
  • If you are making trigger for individual users you will need to run the trigger/delete call with the users access token. You should already have a user access token from user/create_anon or oauth/token methods.

    You might want to check out the docs on authentication for a better idea of Application Level vs User Level calls.

    I could point you in the right direction if you can post the code you are using to create the triggers.

  • It is also possible that you don't need to make separate triggers for each user, since the user profile is sent in the trigger payload. See Trigger Callback for an example.

    You could use the subscribe/unsubscribe methods of a layer to activate and deactivate the triggers for specific users.
  • Aaron, can you please comment on the issue with user specific triggers? The app we're developing requires only user specific triggers and potentially at a high scale.

    I was hoping to to ask for the current number of triggers per application and per user that Geoloqi can support?

    Also another question, how fast can we remove and add new triggers for each user?

  • With regard to deleting triggers, the other way to handle it is to create and delete the trigger with your application token. (Note, do not include the application access token in your app, do this on a server somewhere). In other words, you must delete the trigger as the same account that created it.

    You should be able to quickly add and remove triggers for a user. How fast do you need to do so? I imagine you won't have any trouble with one request every couple seconds for a user.

    The other thing to keep in mind is that the "passive" tracking profile is not really designed for quick updates like this. You may need to use the "realtime" mode, which will use more battery but will send much more detailed updates to the server. If you are changing the content quickly, you'll need very accurate data from the phone in order for it to work well.

Howdy, Stranger!

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

In this Discussion