Change Plugin Permission

View as Markdown
### Grant or revoke a user's permission for a plugin. **Available to:** All authenticated users **Environments:** Live **[Rate Limit](/api/authentication#request-rate-limits-and-time-penalties):** No endpoint-specific limit Grants or revokes a user's approval for a named plugin entitlement. Identify the plugin with `pluginName` and set `approval` to `true` to grant the permission or `false` to revoke it. Provide `userId` to change the permission for a specific user; if omitted, the change applies to the calling user. This is a Live-only endpoint; calling it on Demo returns an environment error directing you to the Live host. The request is forwarded to the licensing service, which applies the change and returns the result. On success, the response returns with `ok` set to `true` and an empty `errorText`. On a handled failure, `ok` is `false` and `errorText` describes the problem. **Common Failure Scenarios** - The endpoint is called on Demo rather than Live (returns an environment error). - The `userId` doesn't exist or isn't accessible to the caller. - The licensing service is unavailable or returns an error while applying the change. - The access token is missing or invalid (returns `HTTP 401`). **Error Messages** | `errorText` | Trigger | |-------------|---------| | `"This endpoint should be called on live.tradovateapi.com"` | The request was sent to the Demo host. | | Non-empty `errorText` | The request failed; `ok` is `false` and the field describes the reason. |

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
pluginNamestringRequired<=64 characters
approvalbooleanRequired
userIdlongOptional

Response

SimpleResponse
okboolean
errorTextstring<=8192 characters

Non-empty if the request failed