FMLDevelopers

General

Get API information

GET/API key only

Use it to check that the API is up and that your API key is accepted. Returns version, apikey and userid: the authenticated member's id, else the X-VDM-Uniqid value, else unknown.

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "version": "2.0",
  "apikey": "{{apikey}}",
  "userid": "1237346633",
  "meta": {},
  "badge": [],
  "badge_display": []
}

A real API response, on test data. Lists are cut to 2 items.

Get the app configuration

GET/appconfigAPI key only

Returns a configuration object under data, cacheable for 24 hours. It currently holds at most a contest boolean (whether a story contest is running) and may be empty.

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/appconfig" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": [],
  "meta": {},
  "badge": [],
  "badge_display": []
}

A real API response, on test data. Lists are cut to 2 items.

Send a message to support

POST/supportAPI key only

When authenticated, the member's username and email are used as the sender. Otherwise, username must be a valid email address. The subject is prefixed with your API key's description. Returns 202 on success, 400 if the email, subject or message is missing or invalid.

Parameters

usernameoptional
string, POST — sender's email address (required when not authenticated, ignored otherwise)
subjectoptional
string, POST, required — message subject
messageoptional
string, POST, required — message body
Request
curl -X POST "https://www.fmylife.com/api/v2/support" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 202
{
  "data": null,
  "meta": {},
  "badge": [],
  "badge_display": []
}

A real API response, on test data. Lists are cut to 2 items.

Discover member profiles

GET/discover/{service}API key only

Returns active members with a profile picture, created within the last created months, paginated (meta). The authenticated member is excluded. Without a service (/discover) and with favorite, birthday and random, a user token is required (401 otherwise); lastprofiles, lastpictures, lastbirthdays and followed also work anonymously. lat/long only apply when authenticated, and this location filter currently returns a server error. Example: /discover/lastprofiles?gender=woman&relation[]=single&agemin=19&agemax=50&page[number]=1&page[bypage]=10.

Parameters

serviceoptionalin the pathformat (favorite|birthday|lastprofiles|lastpictures|lastbirthdays|random|followed)?
string, optional, in the path — favorite (random order for now), birthday (members born on the same date as you), lastprofiles (newest members first), lastpictures (latest profile pictures first), lastbirthdays (members whose birthday is today), random (random order) or followed (most followed first). Without a service: newest members first
latoptional
float or auto, optional — latitude of the search area's center (about ±0.66°); auto uses your home city. Use with long
longoptional
float or auto, optional — longitude of the search area's center (about ±0.66°); auto uses your home city. Use with lat
genderoptional
man or woman, optional — gender of the profiles, based on their title
relationoptional
array of strings, optional — relationship statuses to include: single, couple, complicated (e.g. relation[]=single&relation[]=couple)
ageminoptional
integer, optional — minimum age
agemaxoptional
integer, optional — maximum age
createdoptional
integer, default 24 — only profiles created within this many months
randomoptional
boolean, default false — return the results in random order; any non-empty value other than 0 turns it on
pageoptional
array — pagination: page[number] (page number, default 1) and page[bypage] (items per page, default 30)
Request
curl "https://www.fmylife.com/api/v2/discover/{service}" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": [],
  "meta": {
    "page": 1,
    "per_page": 2,
    "page_count": 0,
    "total_count": 0
  },
  "badge": [],
  "badge_display": []
}

A real API response, on test data. Lists are cut to 2 items.

List category keywords

GET/keywordAPI key only

Returns the current site's keywords used as categories, sorted by name. To search all keywords by prefix, use /keyword/{expr}.

Parameters

exproptional
Not used on this route: to filter by prefix, use /keyword/{expr}
Request
curl "https://www.fmylife.com/api/v2/keyword" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": [
    {
      "id": "20",
      "uid": 20,
      "name": "Animals",
      "label": "Animals",
      "rub": true
    },
    {
      "id": "25",
      "uid": 25,
      "name": "Geek",
      "label": "Geek",
      "rub": true
    }
  ],
  "meta": {},
  "badge": [],
  "badge_display": []
}

A real API response, on test data. Lists are cut to 2 items.

Search keywords by prefix

GET/keyword/{expr}API key only

Returns the current site's keywords whose name starts with {expr}, sorted by name. Unlike /keyword, the results aren't limited to categories.

Parameters

exproptionalin the pathformat (.+)?
string, in the path ({expr}) — beginning of the keyword name
Request
curl "https://www.fmylife.com/api/v2/keyword/{expr}" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": [],
  "meta": {},
  "badge": [],
  "badge_display": []
}

A real API response, on test data. Lists are cut to 2 items.