Skip to main content

Getting and using your API key

How to generate your Teach 'n Go API key and use it securely in API requests.

Written by Abdullah Al-Hussein

The Teach 'n Go API uses an API key to authenticate requests. This article covers where to find your key and the right way to send it.

Only school administrators can generate and view the API key.

Generating your API key

  1. Go to Settings → School settings → Edit school.

  2. Open the Developers tab.

  3. Click Generate API key.

Each school has one API key at a time. If you need to rotate your key (for example, because it was exposed), contact Teach 'n Go support — there is no self-serve rotation button in the interface.

API keys do not expire and have no scope restrictions — a valid key provides access to all available API endpoints for your school.

Using the key in requests

Send the key in the X-API-Key request header:

GET /globalApis/students_attendance_recordsX-API-Key: your_api_key_here

The key can also be passed as a query parameter (?apikey=your_key), but this is not recommended — query parameters are routinely captured in server logs, proxy logs, and browser history, which exposes your key to anyone with access to those logs. Always use the header.

If you send both a header and a query parameter and they contain different values, the request will be rejected. Use one or the other, not both.

Keeping your key secure

  • Do not commit the key to version control (e.g. GitHub)

  • Store it as an environment variable or in a secrets manager

  • Do not share it in Slack, email, or support tickets

  • Contact support immediately if you believe the key has been compromised

Did this answer your question?