Skip to Content
sesameSend

OAuth

List and manage OAuth grants

Retrieve a list of OAuth grants

GET /oauth/grants

Query parameters

NameTypeRequiredDescription
limitintegernoNumber of items to return.
afterstringnoReturn items after this cursor.
beforestringnoReturn items before this cursor.

Example

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

Responses

StatusDescription
200OK
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "string",
      "client_id": "string",
      "scopes": [
        "string"
      ],
      "created_at": "2023-10-06 23:47:56.678+00",
      "revoked_at": "2023-10-06 23:47:56.678+00",
      "revoked_reason": null,
      "client": {
        "name": "string",
        "logo_uri": null
      }
    }
  ]
}

Revoke an OAuth grant

DELETE /oauth/grants/{oauth_grant_id}

Path parameters

NameTypeRequiredDescription
oauth_grant_idstringyesThe OAuth grant ID.

Example

curl -X DELETE "$SESAMESEND_URL/oauth/grants/<oauth_grant_id>" \
  -H "Authorization: Bearer $OPENSEND_API_KEY"

Responses

StatusDescription
200OK
{
  "object": "oauth_grant",
  "id": "string",
  "revoked_at": "2023-10-06T23:47:56.678Z",
  "revoked_reason": "string"
}