MobileApp

Generateembedtoken

Changed on

Function: GenerateEmbedToken
Type: API Endpoint (GET)

Purpose:
This function retrieves an embed token for a specific user and report based on the provided parameters. The response is returned in JSON format.

Endpoint:
GET http://<baseURL>/api/alkembI/EmbedToken?user=<Encoded User Code>&report=<Encoded Report Code>&App_Code=<Customer Application Code>

Headers:
The request must include the following header:

  • Customer_Key: <Encoded Customer Key (LSCode|FirmCode)>

Request Parameters:
The following query parameters should be included in the request:

  • user: user code.
  • report: report code.
  • App_Code: application code.

Response:
On success, the API returns a JSON object containing the embed token and related information.

Response Example:

{
    "result": {
        "tokenId": "<tokenId>",
        "accessToken": "<accessToken>",
        "tokenExpiry": "<tokenExpiry>",
        "reportConfig": [
            {
                "reportId": "<report id>",
                "reportName": "<reportName>",
                "embedUrl": "<embedUrl>",
                "datasetId": "<datasetId>"
            }
        ]
    }
}

Error Handling:
In case of failure (e.g., invalid parameters, unauthorized access), the API will return an appropriate error response.

Example Error Response:

{
    "status_code": "400",
    "status": "error",
    "message": "Invalid request parameters"
}

Notes:

  • Ensure that all required parameters are provided in the request.
  • The function may perform additional checks or validations based on the provided parameters.
get/api/MobileApp/generate_embed_token

Request

Query parameters

userstring required
reportstring required

Headers

App-Codestring required
Emailstring required
Customer-Keystring nullable

Response

Successful Response

unknown required

Changes