---
updatedAt: 2025-11-20T07:34:17.000Z
agentTools:
  projectIndex: https://partner-docs.gupshup.io/llms.txt
---

# Get Access Token for an App

This API endpoint enables partners to generate or retrieve an access token for their partner application. The token is used for authenticating API calls to WhatsApp Business API and other Gupshup services. The endpoint follows an idempotent pattern - if a token already exists for the partner-app combination, it returns the existing token; otherwise, it generates a new one.

You can use this token to get App’s templates, submit templates, send messages etc.\
You will need below details to start using this API.

1. Partner token

### Request Parameters

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Key
      </th>

      <th style={{ textAlign: "left" }}>
        Value
      </th>

      <th style={{ textAlign: "left" }}>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        Authorization
      </td>

      <td style={{ textAlign: "left" }}>
        \{\{PARTNER\_TOKEN}}
      </td>

      <td style={{ textAlign: "left" }}>
        JWT Token issued post Partner login 
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        App ID
      </td>

      <td style={{ textAlign: "left" }}>
        \{\{APP\_ID}}
      </td>

      <td style={{ textAlign: "left" }}>
        Unique Identifier for Gupshup App. The ID should be a valid App ID of Gupshup  

        The **App must be associated** with the account that owns the PARTNER\_APP\_TOKEN being utilized. 
      </td>
    </tr>
  </tbody>
</Table>

### Sample Request

```curl
curl --location --request GET 'https://partner.gupshup.io/partner/app/{{APP_ID}}/token/' \
--header 'Authorization: {{PARTNER_TOKEN}}'
```

### Sample Response

```json
{
    "status": "success",
    "token": {
        "token": "sk_20c901e*********2a592484********1",
        "authoriserId": "aac***e8-d**c-****-a93f-**d6d5a***e8",
        "requestorId": "4**2",
        "createdOn": 1705905891100,
        "modifiedOn": 1705905891100,
        "expiresOn": 0,
        "active": true
    }
}
```

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Token Apis",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://partner.gupshup.io"
    }
  ],
  "paths": {
    "/partner/app/{appId}/token": {
      "get": {
        "tags": [
          "App"
        ],
        "summary": "App | Get access Token",
        "parameters": [
          {
            "name": "token",
            "in": "header",
            "required": true,
            "description": "Partner token",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appId",
            "in": "path",
            "description": "App id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "status": "success",
                  "token": {
                    "active": true,
                    "authoriserId": "2bcff806-80ec-46b0-84e3-dfde3de9e56f",
                    "createdOn": 1686212693043,
                    "expiresOn": 0,
                    "modifiedOn": 1686212693043,
                    "requestorId": "1368",
                    "token": "sk_df01166a4e1b4c17af4479fcc6f76167f"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "property1": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid access token": {
                    "value": {
                      "message": "Invalid Access Token",
                      "status": "error"
                    }
                  },
                  "Do not have permission to access api": {
                    "value": {
                      "message": "You do not have the required permissions to access this API",
                      "status": "error"
                    },
                    "summary": "Do not have permission to access api"
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "500": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "example": {
              "message": "Internal Server Error. Please contact Gupshup team",
              "status": "error"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```