Create Session

Creating a Session

Here we'll explain what a session is, why you need one, and how to create it.

What are sessions?

A session is an ID that is acquired with the createsession method. You need a session id (sid) before trying any other end points to interact with the Food Essentials API. Use the "Create Session" method to create a new session id that you can then use for all other methods.

Why do I need a session?

Sessions have been put in place to provide the infrastructure for future product recommendation functionality.  In order to make accurate and personalized product recommendations to help users find healthier products we need to record actions to a session. 

What does a session look like?

Using your appid you call for a session ID that will be returned as a json or xml string. The only things required are a uid, a devid, and an appid. 

Here is a break-down of every option for the call:

Create Session - createsession
Parameter Status Type Description Example
uid required string User ID (see FAQ: uid)   000e1100-e11b-11d1-a111-111111110000
devid required string Device ID (see FAQ: devid)   You can get it from android.provider.Settings.System.ANDROID_ID for Android Apps.
For iPhone, refer to this doc.
appid required string App ID (see FAQ: appid)  


f required string Output format as JSON or XML "json"
c optional string Callback
v optional string Version "2.00"

Request URI:

Response Body: