JSON Configuration

API Configuration JSON

The following is a JSON configuration suitable for OCS, which you can copy and use directly:

[
    {
      "url": "http://localhost:8888/api/search?token=Your API Keys",
      "method": "get",
      "contentType": "json",
      "name": "T-Link Question Bank API Platform",
      "homepage": "http://localhost:8888/",
      "data": {
        "title": "${title}",
        "options": "${options}",
        "type": "${type}"
      },
      "handler": "return (res)=> res.code === 1 ? [res.question, res.answer] : [res.msg, undefined]"
    }
]

Tip: Please Login or Register first, create API Keys, and then get the complete configuration.

Usage Instructions

  1. Copy the JSON configuration above
  2. Paste the configuration into your application
  3. Make sure you have purchased a plan and your API Keys are active
  4. Start calling the API to answer questions

For more API details, please check the API Docs.