Library
FD1 Session Endpoint
Authenticates your client session to the server. This must be sent first when opening a websocket.
Fields
| Field | Description |
| apikey | Sends your APIKey. |
| token | Sends your token. Used for short term authentication |
| encryption_user | Beta Testing. |
| Optional Fields | |
| tz | Users timezone. Collected in browser using tz: (new Date()).getTimezoneOffset() |
| localtime | Users localtime. format "YYYY-MM-DD HH:mm:SS.ccc"
Collected in browser using
let myDate = new Date()
localtime: myDate.getFullYear() + "-" + (myDate.getMonth() + 1)
+ "-" + myDate.getDate() + " " + myDate.getHours()
+ ":" + myDate.getMinutes() + ":" + myDate.getSeconds()
+ "." + myDate.getMilliseconds()
|
| geo | |
fd1.session.login
- Must provide one, and only one, of apikey, token, or encryption_user
Example
{
a: "fd1.session.login",
v: {
apikey: "my api key",
tz: myDate.getTimezoneOffset(),
localtime: myDate.getFullYear() + "-" + (myDate.getMonth() + 1)
+ "-" + myDate.getDate() + " " + myDate.getHours()
+ ":" + myDate.getMinutes() + ":" + myDate.getSeconds()
+ "." + myDate.getMilliseconds()
}
}