Skip to documentation

API · OAuth grants

List Grants

List your team’s OAuth grants (requires full access). Resource is null because grants cover the installation; revocation details may be unavailable.

GET/oauth/grantsFull access

Request parameters

ParameterTypeDescription
limit
query · optional
integer
1–100
Default: 20
Number of results to return. See Pagination.
after
query · optional
stringResource ID for the next page. Cannot be combined with before. See Pagination.
before
query · optional
stringResource ID for the previous page. Cannot be combined with after. See Pagination.

Request example

Set OPENSEND_BASE_URL to your API origin and OPENSEND_API_KEY to a full-access key. OAuth tokens with full_access also work.

bash
curl -X GET "$OPENSEND_BASE_URL/oauth/grants" \
  -H "Authorization: Bearer $OPENSEND_API_KEY"

Response

200 · application/json. Example IDs stand for IDs returned by your installation.

json
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "YOUR_ID",
      "client_id": "YOUR_CLIENT_ID",
      "scopes": [
        "example"
      ],
      "resource": null,
      "created_at": "example",
      "revoked_at": "example",
      "revoked_reason": "example",
      "client": {
        "name": "example",
        "logo_uri": "example"
      }
    }
  ]
}

Behavior and errors

These operations use standard REST authentication, errors, request logging, and team rate limits. Listing returns the paginated object/has_more/data envelope. Grants cover the installation, so resource is null; historical or externally invalidated grants may lack revocation timestamps and reasons.

Revocation returns an oauth_grant object with id, revoked_at, and revoked_reason: "revoked_from_api". Its tokens immediately fail grant validation. Missing, foreign, or already-revoked grants return 404. See the shared REST contract.