Running the Examples

The examples in the following pages show you how to construct HTTP requests to invoke the Fitness REST API:

To try these examples, you need to obtain an OAuth token first. Then you can submit the example requests without having to build an application by either:

Submit requests with the OAuth Playground

This process is described in Getting Started. The examples indicate the HTTP method to use and provide the request body.

Submit requests with curl


  • Install curl if it is not installed on your machine.
  • Obtain an OAuth token as described in Getting Started.

Fore more information about OAuth tokens and authorization, see Authorizing Requests.

To run each of the examples:

  1. Copy and paste the request body from the example into a plain text file.
  2. Copy the curl command from the example and paste it into a terminal window.
  3. Edit the command to replace the OAuth token value and the name of the file that contains the request body.
  4. Run the resulting command on the terminal.

curl sends the HTTP request with the authorization header and shows the response on the terminal.