Configure an API Token for a Server Application Programming Server Library - Author-it On-Premises - Author-it

Author-it Development Documentation

When you configure the Apache Server Application Programming Interface to require an API token, you must also configure each library with an API token. You pass the API token as a parameter in the ApiLogin method. You configure API tokens for a library by adding to the LIBRARY_OPTION table in the database an option with the name API_TOKENS.

  • To Configure an API Token for a Server Application Programming Server Library

  1. Open the database that contains the Author-it library in an SQL management tool (for example, SQL Server Management Studio).

  2. Run the following SQL script.

    Note: Replace [MY_API_TOKEN] with the value that you want to set as the API token.

    INSERT INTO LIBRARY_OPTION

    ([OPTION], SETTING)

    VALUES (N'API_TOKENS', N'[MY_API_TOKEN])

This creates a new row in the LIBRARY_OPTIONS table with the value API_TOKENS for the OPTION column and [MY_API_TOKEN] for the SETTING column.

Note: The script above will fail if the database already has a setting for API_TOKENS in the LIBRARY_OPTION table.

You may change the token value by editing the SETTING column value. You may configure the library to support multiple API tokens by setting the SETTING column to a comma-delimited list of tokens.