fatsecret Platform API Documentation
Description
Returns the authentication information for a nominated user.
You can also use the full 3-legged OAuth provided by fatsecret.com to attain an access token for a profile that is linked to a user account on fatsecret.com. For more information click here.
Parameters
URL / Method
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| URL (new) Method |
N/A | Required | "https://platform.fatsecret.com/rest/profile/auth/v1" HTTP "GET" |
| OR | |||
| method | String | Required | "profile.get_auth" (included with other parameters) |
Additional Parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| user_id | String | Optional | You can set your own ID for the newly created profile if you do not wish to store the auth_token and auth_secret |
| format | String | Optional | The desired response format. Valid response formats are "xml" or "json" (default value is "xml"). |
URL Based Integration
As part of a transition away from parameterized methods as actions, we have introduced a URL based structure with a relative HTTP Method (GET, POST, PUT, DELETE)
You may continue to use method based calls however we recommend updating to path based calls for new integrations.
Please refer to our guide here for additional information
Response
Each profile element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| auth_token | String | Oauth key |
| auth_secret | String | Oauth secret key |
Example Response
Example 1:
<?xml version="1.0" encoding="utf-8"?>
<profile xmlns="http://platform.fatsecret.com/api/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://platform.fatsecret.com/api/1.0/ http://platform.fatsecret.com/api/1.0/fatsecret.xsd">
<auth_token>639aa3c886b849d2811c09bb640ec2b3</auth_token>
<auth_secret>cadff7ef247744b4bff48fb2489451fc</auth_secret>
</profile>
Example 1:
{
"profile": {
"auth_secret": "cadff7ef247744b4bff48fb2489451fc",
"auth_token": "639aa3c886b849d2811c09bb640ec2b3"
}
}
Error Codes
| CODE | TYPE | DESCRIPTION |
|---|---|---|
| 2 | OAuth 1.0 | Missing required oauth parameter: '<details>' |
| 3 | OAuth 1.0 | Unsupported oauth parameter: '<details>' |
| 4 | OAuth 1.0 | Invalid signature method: '<details>' |
| 5 | OAuth 1.0 | Invalid consumer key: '<details>' |
| 6 | OAuth 1.0 | Invalid/expired timestamp: '<details>' |
| 7 | OAuth 1.0 | Invalid/used nonce: '<details>' |
| 8 | OAuth 1.0 | Invalid signature: '<details>' |
| 9 | OAuth 1.0 | Invalid access token: '<details>' |
| 101 | Parameter | Missing required parameter: '<details>' |
| 106 | Parameter | Invalid ID: '<details>' |