Get steps from the Google Fit API using PHP

Build an integration towards the Google Fit API using PHP showing the number of steps for the last 7 days.

This project contains of 4 tasks:

- Implement the google-api-php-client ([login to view URL])

- put the number of steps for the last 7 days starting from current day into an array:

$steps[0] (current day) to $steps[6] (6 days ago)

- show the timestamp (epoch) for the last retrieved activity from Google Fit (usually 0 to 5 hours). Se example below. (This is used to show how long ago the google fit app was synced)

- once the access token has expired (after 1 hour) and the page is reloaded, it shold refresh the token without any new consent from the user.

This should be a single PHP page. On the page it should be:

- a link/button to authenticate to the Google Oauth (standard oauth process)

- print the array of steps like:

"Today: $steps[0]<br/>

1 day ago: $steps[1]"

and so on...

- print the epoch timestamp for current day, like:

"Timestamp: 1601037000633948165"

The page does not have to look pretty, just text is fine.

It's preffered to run this in PHP 5.6, if this caused some problems it can run in PHP 7.x instead.

More info about the REST API:

[login to view URL]

More info about the oauth process:

[login to view URL]

More info about reading the daily steps:

[login to view URL]

Attached is examples from the Google API playground of the POST request and the response.

Here are also some explainations:

POST request:

This is used to set timestamp for start (7 days ago) and current day.

"startTimeMillis": 1600639200000,

"endTimeMillis": 1601244000000

POST response:

Number of steps:

"intVal": 1841

Timestamp for last activity (to be printed on the page for current day):

"endTimeNanos": "1600712516394036541",

Compétences : PHP, HTML, OAuth, Google APIs, RESTful API

en voir plus : google fit api data source, google fit api response, google fit rest api, google fit api call, google fit api java, google fit api get data, google fit rest api example, google fit api tutorial, parse yahoo weather api using php, google maps api photo php, songs search engine api using php, google maps api script php asp, web based game using php build town, google maps api script php, google maps api nearest php, google position script using php, geocode google maps api mysql php, google map api direction php api, google maps api market php mysql, google map api using script

Concernant l'employeur :
( 0 commentaires ) Moelndal, Sweden

Nº du projet : #27534141

Décerné à:


Hi, I'm really experienced in Google APIs integration and I'm available immediately. Requirements are perfectly clear and doable by the next few hours for sure. Contact me to discuss it further. Thanks

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% EUR en 2 jours
(75 Commentaires)

10 freelances font une offre moyenne de 174 € pour ce travail


Hello Sir, Can i have more detail please? I am willing to start right away. Please check my profile for work and experience. Regards Hardeep

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 2 jours
(303 Commentaires)

Hello? I have read your description. I can provide great result that you are asking for as I have rich experiences in here. Could you please open your chat box for me? Let's get the great result together. Thanks.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 3 jours
(24 Commentaires)
(38 Commentaires)
(6 Commentaires)

Hi, I can integrate the Google Fit & OAuth 2 API in php to show the daily steps for the whole week. I have 3 years of web design and development experience. Please message me for further discussion.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 3 jours
(11 Commentaires)

Hello, I have experiences in Google API Integration. I have been build website using these kind of API for 5 years. Please contact me to discuss further to get started to work for me. I am ready now. Thank you.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 7 jours
(4 Commentaires)

Dear sir, I am a web developer(PHP) from Russia. *I hope you and your family are safe from COVID-19, and your business is going well* I've just read your job description carefully and I'm very interested on your projec Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 7 jours
(9 Commentaires)

Hi, there. Hope you are doing well. I am a senior php developer with 5 years of experience in Google fit api. I fully understood your requirement and I am sure that I can do your job perfectly. Reach out to me here on Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 2 jours
(0 Commentaires)

Hi , I read through the job details extremely carefully and I am absolutely sure that I can do the project very well. I have worked on similar projects to what you are looking for, and I am confident I can exceed your Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 7 jours
(0 Commentaires)