---
updatedAt: 2025-11-03T17:50:27.000Z
agentTools:
  projectIndex: https://docs.gupshup.io/llms.txt
---

# Get Access Token for an App

Use this API to get the access token for your Gupshup App

> ❗️ Attention
>
> This guide is no longer maintained from 31st Jan 2025. Please refer the updated one [here](https://partner-docs.gupshup.io/docs/gupshup-partner-eco-system).

<br />

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>
        Key
      </th>

      <th>
        Value
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        Authorization
      </td>

      <td>
        \{\{PARTNER\_TOKEN}}
      </td>

      <td>
        JWT Token issued post Partner login 
      </td>
    </tr>

    <tr>
      <td>
        App ID
      </td>

      <td>
        \{\{APP\_ID}}
      </td>

      <td>
        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"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "examples": {
                  "Do not have parmission to access api": {
                    "value": {
                      "message": "You do not have the required permissions to access this API",
                      "status": "error"
                    }
                  },
                  "Invalid access token": {
                    "value": {
                      "message": "Invalid Access Token",
                      "status": "error"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "400": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "example": {
              "status": "error",
              "message": "Unauthorised Access"
            }
          }
        }
      },
      "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
  }
}
```