### HTTP GET request for documentation query Source: https://docs.zenda.com/parent-authentication-api/llms.txt Perform an HTTP GET request on the documentation index using the ask and goal parameters to retrieve answers and relevant excerpts. ```http GET https://docs.zenda.com/parent-authentication-api/introduction.md?ask=&goal= ``` -------------------------------- ### Request Headers for Authentication Source: https://docs.zenda.com/parent-authentication-api/api-reference.md Example of the required Content-Type and Authorization headers using Basic authentication. ```css Content-Type: application/json Authorization: Basic VGhpc0lzVGhlU2Nob29sc0NsaWVudElEOlRoaXNJc0FTZWNyZXRLZXk= ``` -------------------------------- ### GET /parent-authentication-api/introduction.md Source: https://docs.zenda.com/parent-authentication-api/llms.txt Performs a natural language query against the documentation index to retrieve an answer and relevant sources. ```APIDOC ## GET /parent-authentication-api/introduction.md ### Description Perform an HTTP GET request on the documentation index with the `ask` parameter to retrieve a direct answer and relevant excerpts from the documentation. ### Method GET ### Endpoint https://docs.zenda.com/parent-authentication-api/introduction.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask, written in natural language. - **goal** (string) - Optional - Describes the broader end goal to tailor the answer. ``` -------------------------------- ### Unauthorized Response (401) Source: https://docs.zenda.com/parent-authentication-api/api-reference.md Error response returned for invalid credentials or missing authorization headers. ```json { "error": "Invalid clientId or secretKey" // OR // "error": "Invalid or expired token. Please authenticate again." // "error": "Invalid/Missing Authorization Header" } ``` -------------------------------- ### Bad Request Response (400) Source: https://docs.zenda.com/parent-authentication-api/api-reference.md Error response returned when parameters are missing or invalid. ```json { "error": "Missing or invalid parameter: [parameter_name]" } ``` -------------------------------- ### Successful Response (200) Source: https://docs.zenda.com/parent-authentication-api/api-reference.md The response body returned upon successful authentication, containing the redirect URL and expiry timestamp. ```json { "redirectURL": "https://.zenda.com/", "expiresAt": "2024-09-30T13:03:14.705871Z" } ``` -------------------------------- ### Conflict Response (409) Source: https://docs.zenda.com/parent-authentication-api/api-reference.md Error response returned when multiple profiles are found for the provided details. ```json { "error": "Multiple profiles found. Only one entry is expected" } ``` -------------------------------- ### POST /api/external/token/v2 Source: https://docs.zenda.com/parent-authentication-api/api-reference.md Generates a secure redirect URL for parent authentication by validating student and parent details. ```APIDOC ## POST /api/external/token/v2 ### Description Generates a secure redirect URL for parent authentication. This endpoint requires Basic Authorization using a client ID and secret key. ### Method POST ### Endpoint /api/external/token/v2 ### Parameters #### Request Body - **targetMetadata** (Object) - Mandatory - Contains platform, useCase, and targetData. - **studentDetails** (Object) - Mandatory - Contains registerNo. - **parentDetails** (Object) - Optional - Contains email or phone. ### Request Example { "targetMetadata": { "platform": "web", "useCase": "auth", "targetData": { "path": "dashboard" } }, "studentDetails": { "registerNo": "" }, "parentDetails": { "email": "parent@email.com" } } ### Response #### Success Response (200) - **redirectURL** (String) - URL for the user to be redirected to, for logging in. - **expiresAt** (String) - Expiry timestamp of the URL. #### Response Example { "redirectURL": "https://.zenda.com/", "expiresAt": "2024-09-30T13:03:14.705871Z" } ``` -------------------------------- ### Unprocessable Entity Response (422) Source: https://docs.zenda.com/parent-authentication-api/api-reference.md Error response returned when provided details do not exist in school records or are mismatched. ```json { "error": "Mobile number does not exist with school records" // OR // "error": "Email address does not exist with school records" // "error": "Register number does not exist with school records" // "error": "Register number is not mapped with given email/mobile" // "error": "We were unable to process your request at the moment" } ``` -------------------------------- ### Internal Server Error Response (500) Source: https://docs.zenda.com/parent-authentication-api/api-reference.md Error response returned when an unexpected exception occurs on the server. ```json { "error": "Exception occurred while processing the request" } ``` -------------------------------- ### Authentication Request Body Source: https://docs.zenda.com/parent-authentication-api/api-reference.md JSON structure for the POST request, including target metadata, student registration number, and parent contact details. ```json { "targetMetadata": { "platform": "web", "useCase": "auth", "targetData": { "path": "dashboard" } }, "studentDetails": { "registerNo": "" }, "parentDetails": { "email": "parent@email.com" // OR "phone": "+919123123123" } } ``` -------------------------------- ### Forbidden Response (403) Source: https://docs.zenda.com/parent-authentication-api/api-reference.md Error response returned when the user profile is blocked. ```json { "error": "Profile is blocked and cannot be accessed" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.