---
updatedAt: 2026-05-27T07:15:32.000Z
---

# Generate secret key

> ⚠️ Important
>
> All API V2 tokens generated before March 10, 2026, 19:00 UTC have been revoked. If your token was generated before this date, please regenerate it. [Learn how](https://support.appsflyer.com/hc/en-us/articles/360004562377-Managing-AppsFlyer-tokens).


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Click Signing API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://hq1.appsflyer.com/api/p360-click-signing/v2.0"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/secret": {
      "post": {
        "tags": [
          "Generate secret key"
        ],
        "summary": "Generate secret key",
        "description": "> ⚠️ Important\n>\n> All API V2 tokens generated before March 10, 2026, 19:00 UTC have been revoked. If your token was generated before this date, please regenerate it. [Learn how](https://support.appsflyer.com/hc/en-us/articles/360004562377-Managing-AppsFlyer-tokens).\n",
        "operationId": "click-signing-secret-post",
        "parameters": [
          {
            "name": "ttl-hours",
            "in": "query",
            "description": "Default value: 36",
            "schema": {
              "type": "number",
              "format": "integer"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Secret key generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "secret-key-id": {
                      "description": "An ID for the secret key",
                      "type": "string"
                    },
                    "secret-key": {
                      "description": "The secret key for the click signature",
                      "type": "string"
                    },
                    "expiration": {
                      "description": "Epoch time in milliseconds",
                      "type": "number",
                      "format": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                },
                "examples": {
                  "Invalid ttl": {
                    "summary": "Invalid ttl",
                    "value": {
                      "messege": "Invalid ttl value, must be a number between 1 to 1440"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "429": {
            "description": "Too many active keys",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "> ⚠️ Important\n>\n> All API V2 tokens generated before March 10, 2026, 19:00 UTC have been revoked. If your token was generated before this date, please regenerate it. [Learn how](https://support.appsflyer.com/hc/en-us/articles/360004562377-Managing-AppsFlyer-tokens).\n\nToken required for authorization. Please refer to [this link](https://support.appsflyer.com/hc/en-us/articles/360004562377) for instructions on how to obtain the token.\n"
      }
    },
    "schemas": {
      "error_response": {
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
```