---
title: "Generateembedtoken"
method: GET
path: "/api/MobileApp/generate_embed_token"
tags: ["MobileApp"]
---

# Generateembedtoken

`GET /api/MobileApp/generate_embed_token`

## Request

- Base URL: `https://api.leapsurgebi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.leapsurgebi.com/api/MobileApp/generate_embed_token`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/token`
- TypeScript: <https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/docs/api/MobileApp/generate_embed_token/get.ts> (a function with typed inputs; its response is checked against the schema)

**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**:  
```json
{
    "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**:  
```json
{
    "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.

## Query parameters

- `user` string, required
- `report` string, required

## Headers

- `App-Code` string, required
- `Email` string, required
- `Customer-Key` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `23b42df3193a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/changes/api/MobileApp/generate_embed_token/get.md)

---

[API](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi.md) - [All operations](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/llms.txt) - [OpenAPI document](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/revisions/13653cb8ee76?raw)
