Counting days since app installation in dashboard widget app

,

Hi everyone,

I’m developing a dashboard widget app and need a reliable way to count the number of days since the app was installed.

I initially tried querying “app_installs” to retrieve the installation timestamp and compare it with the current date, but this approach only works for app collaborators, which makes it unsuitable for all users.

Does anyone have a better approach or workaround to achieve this? Any suggestions would be greatly appreciated—this is quite urgent!

Thanks in advance for your help!

Hello there @aleksandar,

Why would using a collaborator’s token be an issue?

Looking forward to hearing from you :smile:

Cheers,
Matias

Hi @Matias.Monday

Thanks for your response!

The issue is that using a collaborator’s token limits access to only app collaborators. However, I need this functionality to work for all users of the app, not just collaborators.

Is there any way to retrieve the installation date (or a similar reference point) that would be accessible to every user, regardless of their role?

Appreciate any guidance on this!

Hello again,

Matias here!

As of today, it is not possible to retrieve that information via API without using a collaborator’s API token.

As a workaround, you could create a service user in your account (it is just like any other user but not connected to a specific person), and you could add that service user as a collaborator and always use that service user’s token to make this specific request :smile:

Cheers,
Matias

1 Like

Thanks for the update, @Matias.Monday

I appreciate the workaround suggestion. Unfortunately, it’s not quite suitable for my case, but it’s good to know that there’s no direct solution at the moment. Hopefully, this can be considered as a feature in the future.

Thanks again for your help!

Happy to help @aleksandar !

1 Like