Skip to content
 
 

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

FatSecret Platform API

For detailed information on the API refer directly to the online documentation

Getting started

  1. Ensure you have created a FatSecret Platform API account here and sign in.

FatSecret Platform API

  1. Navigate to "Generate / View API Keys".

Login Menu

  1. Navigate to "IP Restrictions".

Manage API Keys

  1. In the "IP Restrictions" section, whitelist your desired IP Address. We block requests to FatSecret API for OAuth2.0 for a Key/Secret if the source IP is not white listed. Up to 15 ranges of IP addresses can be whitelisted.

IP Whitelist

  1. Now head to Postman and fork the collection by clicking the "Run in Postman" button:

Run in Postman

  1. In your newly forked collection, copy your Consumer Key and Consumer Secret into the collection variables as consumer_key and consumer_secret. Copy your Client ID and Client Secret into the collection variables as client_id and client_secret.

Variables

Using OAuth 1.0 with FatSecret Platform API in Postman:

  1. Navigate to API Reference (OAuth 1.0) section in postman.

Postman OAuth1

  1. You can now access all endpoints not marked as "Profile".

  2. For access to "Profile" endpoints, Navigate to Profile - Authentication folder and call the "Create" endpoint to create a profile and receive an oauth key and oauth secret.

  3. Copy your newly created OAuth Key and OAuth Secret into the collection variables as access_key and access_secret.

Using OAuth 2.0 with FatSecret Platform API in Postman:

  1. Navigate to API Reference (OAuth 2.0) section in postman.

Postman OAuth2

  1. In the "Configure New Token" section ensure that the correct variables are set and click "Get New Access Token".

  2. Use the newly created token.

Using 3-Legged OAuth with FatSecret Platform API in Postman:

  1. Navigate to 3-Legged OAuth section in postman.

3-Legged OAuth

  1. Use the "Request Token" endpoint to request a new oauth token and oauth secret

  2. Copy the oauth_token and oauth_secret received into the collection variables.

  3. Use the "Authorize" endpoint to authorize the oauth_token received. You will need to log in to your fatsecret account to do this. A link should return the verifier value, copy this into the collection variable oauth_verifier.

NOTE: You may need to send the authorize request using a browser in order to login and open the callback url response.

  1. Finally, Use the "Access Token" endpoint to get the access token and access secret.

  2. Copy the received oauth token and oauth token secret from the "Request Token" end point to the access_token and access_secret collection variables.

  3. You can now access endpoints in the OAuth1.0 section.

Enjoy the API!

About

Getting started with FatSecret Platform API using Postman

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors