What is the best PHP SDK to use to access the Garmin Health data?
What is the best PHP SDK to use to access the Garmin Health data?
There really is no SDK to access the Health data as such.
There is a "Confidential" specification ( Health_REST_API_Specification_2.9.6_Worldwide.pdf) which contains much of the material required to access the health API and which is provided to "approved developers" once you have completed Garmin's approval process
Thanks for the reply. I saw that document and am wondering what's the best way to implement it in PHP. If you've done it before, could you please share some code? Thank you.
Yes, but only with a great deal of invaluable assistance from the Health team, I have implemented an app in PHP.
In which area do you require assistance? Please outline your app and current stage of development of the Health API.
Great! Well, I am only starting so don't have anything yet, but basically I will need access to all APIs available. For the start, I would be interested how to make the first step - to authorise to the API via provided API Key + Secret which I've generated. I understand it's done via Oauth2? If you could share some working example of this + some simple example of 1 API call so I can have an idea. Thank you.
I will need access to all APIs available
Really? Is this a genuine app?
Yes, it is genuine, why are you asking?
Due diligence.
The Health API is a RESTful API that returns activity summaries and daily summaries as JSON. There is no SDK for working with the Health API, since implementing a RESTful client is dependent on the tech-stack you are working with. With the Health API, there is an option to get the original FIT file for activities. But first you need to implement a RESTful client to retrieve the files and only then you can use the FIT SDK to decode the files.
You can apply for access to the Health API at the link below, and the the Health API team will work with you to decide if your project is right for the Health API and how best to use it.
developer.garmin.com/.../
Once you have access to the Health API, there is a private support forum available in the developer portal where you can ask questions specific to the Health API.
Thank you, I will do that. In the meanwhile, could you please share some example code on how to connect via the REST API and make a sample API call? Once I have this, I'm sure I'll be able to work out the rest. Many thanks.
I’ll be able to assist once you have access to the Health API and have a specific question. It is not appropriate for me to dump a bunch of code as I will first have to redact confidential sections.