Quick Start
Get up and running with the StudyHQ Partner API in minutes: authenticate, generate a student’s assessment link, and fetch their results.
Prerequisites
Before you begin, make sure you have:
- A StudyHQ partner account (contact support@studyhq.com to get onboarded)
- Your project’s
TokenIdandTokenSecret - Your
projectId(provided during onboarding)
Authenticate
The Partner API uses token-based authentication. Tokens are issued per project during onboarding as a pair of credentials:
The TokenSecret is shown only once when the token is created. Store it
securely — if it’s lost, the token must be regenerated.
Include the token in every request via the X-Access-Token header, formatted as
TokenId:TokenSecret:
Step 1 — Generate an assessment URL
After a student registers (or completes payment) on your platform, call the API to generate a unique assessment link.
Response:
Open the redirect-url in a new tab for the student to begin the assessment.
The redirect URL is time-bound and single-use. Generate a fresh URL each time a student needs to take the assessment.
Step 2 — Student completes the assessment
The student takes the assessment on StudyHQ. Results are stored against their email.
Step 3 — Fetch results
Once the student has completed the assessment, retrieve their results and course recommendations.
Response:
Use the Recommendations array to display personalised course options to the
student on your platform.
Token lifecycle & security
Best practices
- Never expose the
X-Access-Tokenheader in client-side code or browser requests. - Don’t log raw request headers in your application.
- Rotate tokens periodically, or immediately if compromised.
- Contact support@studyhq.com for token revocation or rotation.
