The Google Fit APIs, including the Google Fit REST API, will no longer be available after June 30, 2025. As of May 1, 2024, developers cannot sign up to use these APIs.
For instructions on which API or platform to migrate to, visit the Health Connect migration guide. For a comparison of Health Connect with the Google Fit APIs and the Fitbit Web APIs, visit the Health Connect comparison guide.
Learn more about Health Connect and how to integrate with the API.
Users.sessions: delete
Deletes a session specified by the given session ID.
Try it now.
Request
HTTP request
DELETE https://www.googleapis.com/fitness/v1/users/userId/sessions/sessionId
Parameters
Parameter name |
Value |
Description |
Path parameters |
sessionId |
string |
The ID of the session to be deleted.
|
userId |
string |
Delete a session for the person identified. Use me to indicate
the authenticated user. Only me is supported at this time.
|
Authorization
This request requires authorization with the following scope:
Scope |
https://www.googleapis.com/auth/fitness.activity.write |
For more information, see the authentication and authorization page.
Request body
Do not supply a request body with this method.
Response
If successful, this method returns an empty response body.
Try it!
Use the APIs Explorer below to call this method on live data and see the response.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-20 UTC.
[null,null,["Last updated 2023-11-20 UTC."],[[["Deletes a user's fitness session based on the provided session ID."],["Requires authorization with the `https://www.googleapis.com/auth/fitness.activity.write` scope."],["Uses a DELETE request to the specified endpoint with session and user IDs as path parameters."],["The request body should be empty, and a successful deletion returns an empty response body."]]],[]]