Creating an authenticated connection to the host
To access a hosted database, OData requires the following:
-
FileMaker Server: Use a FileMaker file account with a password defined in the hosted database.
-
FileMaker Cloud: Use the Claris ID account and password.
FileMaker Server
To define a connection to a hosted database, use one of the defined OData API URLs and the Authorization header:
-
URL:
For example,
https://host/fmi/odata/v4/database-name/$metadata
-
host - FileMaker Server host name
-
database-name - FileMaker Pro database name
-
-
Header:
Authorization: Basic account:password
-
account:password - The base64-encoded string representing the account name, a colon (:), and the password used to log in to the hosted database. This follows the standard HTTP Basic authentication scheme. For example, if the account name is
admin
and the password isadmin
, then this value is the base64-encoded value ofadmin:admin
, which isYWRtaW46YWRtaW4=
.
In this example, the value of the Authorization header is:
Basic YWRtaW46YWRtaW4=
-
FileMaker Cloud
To define a connection to a hosted database:
-
Generate a Claris ID token for external authentication. See Using Claris ID for external authentication in Claris Customer Console Help.
-
Include the Claris ID token from step 1 in the Authorization header for all OData calls.
Use one of the defined OData API URLs and the Authorization header:
-
URL:
For example,
https://host/fmi/odata/v4/database-name/$metadata
-
host - FileMaker Cloud host name
-
database-name - FileMaker Pro database name
-
-
Header:
Authorization: FMID Claris_ID_Token
Notes
-
For 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.