Sofa
Account

Regenerate webhook token

Generate a new webhook token for an integration. The old token is immediately invalidated.

POST
/account/integrations/{provider}/regenerate-token
better-auth.session_token<token>

Better Auth session cookie

In: cookie

Path Parameters

provider*string

Media server provider type

Value in"plex" | "jellyfin" | "emby" | "sonarr" | "radarr"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "http://localhost:3000/api/v1/account/integrations/plex/regenerate-token" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "provider": "string",
  "type": "webhook",
  "token": "string",
  "enabled": true,
  "lastEventAt": "string",
  "createdAt": "string"
}
{
  "defined": true,
  "code": "NOT_FOUND",
  "status": 404,
  "message": "Integration not found",
  "data": {
    "code": "INTEGRATION_NOT_FOUND"
  }
}