How to check if a user is logged in to an API

Hey! I have a button to connect the users to their Strava account, via the Strava API. All good.

But I need to know when the user is not connected or else I trigger data-pulls that return errors from the API. Any idea how I do this? Can I check their authorisation token or something similar?

I tried setting a State (Strava Logged In) as Yes when the user hits the button that triggers the initial connection with Strava (I don’t mind if they have to hit that once per session) but that state returns to default as the Strava page returns the user to my app and it refreshes everything.

Even if there was a way of not showing the error messages from Strava that would probably be ok.

Going around in circles! All help appreciated.

Thanks,
Steve.

This topic was automatically closed after 70 days. New replies are no longer allowed.