Log in to a database session using a Claris ID account (FileMaker Cloud)
For files hosted by FileMaker Cloud, users are authenticated via Claris ID accounts. Claris ID accounts are defined in the Claris ID identity provider system.
To log in to a hosted database using a Claris ID account, use an HTTP POST method with the sessions
API endpoint specifying the name of a hosted database. The Claris ID token is specified in a header Authorization string. 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 header |
Content-Type: application/json Authorization: FMID {FMID-token} FMID-token is the Claris ID token provided by the Claris ID identity provider system. For information on the Claris ID token, see Claris Customer Console Help. See "Editing Claris ID account access" in FileMaker Pro Help. |
Parameters | An empty set of curly braces. For example: { } |
Response |
The access token, an empty response body, 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. |
Notes
-
To use FileMaker Data API calls with FileMaker Cloud, you must first authenticate using your Claris ID account and retrieve required session tokens. The tokens are valid for one hour. If it has been more than an hour since the last Claris ID authentication, API calls may fail with a 401 error. To resolve the issue, authenticate again using the Claris ID account and retrieve new session tokens.