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.

To define a connection to a database hosted by FileMaker Server:

  • FileMaker Server:

    Use a base64-encoded string representing the account name and password used to log in to the hosted database.

    For example, use the following URL and header:

    • URL: https://host/fmi/odata/v4/database-name/$metadata

      • host - FileMaker Server host name

      • database-name - FileMaker Pro database name

    • Header: Basic database_username:database_password

  • FileMaker Cloud:

    1. Generate a Claris ID token for external authentication. See "Using Claris ID for external authentication" in Claris Customer Console Help.

    2. Include the Claris ID token from step 1 in the Authorization header for all OData calls.

    For example, use the following URL and header:

    • URL: 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.