Log in to a database session
To log in to a hosted database, use an HTTP POST method with the sessions
API endpoint specifying the name of a hosted database. The account name and password are specified in a header Authorization string. For Claris hosts, use the extended Claris account name and password you set in Claris Studio. See “Create an extended Claris account for Claris Server services” in Claris Studio Help Center. If the account name and password are authenticated, your code receives an access token that defines your connection to the database. This connection is called a database session.
HTTP method |
POST |
URL |
/fmi/data/version/databases/database-name/sessions version – the FileMaker Data API version requested can use database-name – the name of the hosted database |
HTTP headers |
Content-Type: application/json Authorization: a base64-encoded string representing the account name and password to use to log in to the hosted database. For Claris hosts, use the extended Claris account name and password you set in Claris Studio. This base64-encoded string should follow the standard HTTP Basic Authentication Scheme. (The account name and password are separated by a colon.) |
Parameters |
An empty set of curly braces. For example: May optionally use the |
Response |
The access token, a response body with the access token, and a messages array showing an error code of 0. The X-FM-Data-Access-Token header is returned in response, which is the session token to be used for subsequent API calls. For example: Copy
See Error responses. |