No internet connection
  1. Home
  2. Documentation

Talkyard API authentication

By KajMagnus @KajMagnus2020-04-25 12:01:03.750Z2020-04-25 12:10:22.620Z

To use non-public parts of the API, you need to generate an API secret: Go to https:// your talkyard site /-/admin/settings/features and click Enable API and save the settings. Now, the API tab appears — go there and generate an API secret.

Note that this API secret is very secret — don't send it in emails to anyone, don't share it with anyone.

Then, when doing API requests from your server to Talkyard's API, include an Authorization header:

Authorization: Basic BASE64_TEXT

where BASE64_TEXT is: tyid=2:API_SECRET but base64 encoded. "tyid" means Talkyard ID, and 2 is the Sysbot user id.
So, tyid=2 means that the API request is being done as the Sysbot user (Sysbot is a Talkyard user intended for API requests).

And API_SECRET is the API secret you generated in the API tab.

  • 0 replies