This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Seeking Help: Garmin Connect API Integration Issues with Empty Responses

Hello everyone,

I'm reaching out because I'm encountering a problem with integrating the Garmin Connect API into my mobile app, which aims to retrieve users' running information. Everything was working fine until recently when I found myself unable to fetch user information, whether it be metrics or activity details.

Here's a summary of the steps I've taken and the issues encountered:

  • OAuth Authentication: I've successfully set up OAuth authentication and obtained a valid access token. I've checked that the token is still valid and has not expired.
  • Permissions: I've confirmed that the access token has the necessary permissions to access activity details and metrics, using the /user/permissions endpoint which returns {"permissions":["ACTIVITY_EXPORT","HEALTH_EXPORT","WORKOUT_IMPORT","COURSE_IMPORT"]}.
  • Endpoint Requests: When making requests to endpoints to retrieve activities (for example, /activityDetails with parameters uploadStartTimeInSeconds and uploadEndTimeInSeconds), I receive an HTTP 200 OK response, but with an empty or null response body. Here's an example of a request I used: apis.garmin.com/.../activityDetails.
  • Verifications: I've checked the UTC timestamps used in the requests and confirmed that they correspond to periods when activities should exist. I've also tested with different time intervals.
  • API Logs and Responses: The logs show that the requests are well-formed and that the API responses indicate a success status (200 OK), but without any data returned. For example: Response{code=200, message='OK', body='null', ...}.

I'm looking for advice or suggestions on how to resolve this issue. Has anyone encountered a similar situation or have any suggestions on what I might try next? Here are additional details about my development environment and the libraries used: [Include details here such as programming language, libraries/APIs used, versions, etc.]

Thank you in advance for your help!

  • Hello everyone,

    I might have made some progress. Indeed, I played around with the Garmin Developer Program page where I can see the endpoints and all, and I noticed that by visually requesting the user's activities (access token + timestamp), I didn't get any responses, which is really odd considering I do get them on the Garmin Connect account. So, I used the API's data generator and now have an output on the API's webpage. Therefore, I tried with my modified URL to tailor it to the activities, and still no output, plus, there are no new entries on Garmin Connect.

    So, I currently have the API site data, Garmin Connect data, and my mobile application all linked by the same access token, but no way to export the information outside their creation platform.

    I am now out of ideas in my search, so if you have any suggestions, you are welcome to share.

  • Plain URI call will not work. You have to replicate multiple HTTP request headers.