fatsecret Platform API Documentation

Welcome to the fatsecret Platform REST API

We provide a REST-like API that allows developers to integrate fatsecret Platform features into their applications. To get started:

  1. Register for an account.
  2. Generate an application Consumer Key and associated Consumer Secret.

URL based integration

All Requests to the fatsecret Platform REST API using URL path and method based integrations should be made to server "https://platform.fatsecret.com/rest/".

For example, a correctly authenticated request to the food.get.v4 API method would appear as follows:


GET https://platform.fatsecret.com/rest/food/v4?
food_id=33691&
Content-Type: application/json
Header: Authorization: Bearer {Access Token}
food_id=33691&format=json
                

GET https://platform.fatsecret.com/rest/food/v4?
food_id=33691&
oauth_consumer_key=9a1a6fd1fff5433f9dd77daa4587bf5d&
oauth_nonce=1234&oauth_signature=sAyYTJiIxOGkvFpBcH8L%2BlFQRCQ%3D&
oauth_signature_method=HMAC-SHA1&
oauth_timestamp=1245126631&
oauth_version=1.0
                

Method based integration

All Requests to the fatsecret Platform REST API using "method" parameters should be directed to "https://platform.fatsecret.com/rest/server.api".

Requests must include a method parameter, distinguishing the different types of calls available. For example, a correctly authenticated request to the food.get.v4 API method would appear as follows:


POST https://platform.fatsecret.com/rest/server.api
Content-Type: application/json
Header: Authorization: Bearer {Access Token}
Parameters: method=food.get.v4&food_id=33691&format=json
                

POST https://platform.fatsecret.com/rest/server.api?
food_id=33691&
method=food.get.v4&
oauth_consumer_key=9a1a6fd1fff5433f9dd77daa4587bf5d&
oauth_nonce=1234&oauth_signature=sAyYTJiIxOGkvFpBcH8L%2BlFQRCQ%3D&
oauth_signature_method=HMAC-SHA1&
oauth_timestamp=1245126631&
oauth_version=1.0
                

Please take some time to read our authentication guide. OAuth 2.0 and OAuth 1.0 are supported.