{
  "opencollection": "1.0.0",
  "info": {
    "name": "Vanilla Addons Tokens API",
    "version": "2.0"
  },
  "items": [
    {
      "info": {
        "name": "Tokens",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get a list of access token IDs for the current user.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://open.vanillaforums.com/api/v2/tokens",
            "params": [
              {
                "name": "fields",
                "value": "",
                "type": "query",
                "description": "Only return fields with these keys from the output. Use dot notation for nested fields."
              }
            ]
          },
          "docs": "Get a list of access token IDs for the current user."
        },
        {
          "info": {
            "name": "Issue a new access token for the current user.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://open.vanillaforums.com/api/v2/tokens",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Issue a new access token for the current user."
        },
        {
          "info": {
            "name": "Exchange an OAuth access token for a Vanilla access token.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://open.vanillaforums.com/api/v2/tokens/oauth",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "This endpoint takes an access token from your OAuth 2 provider and exchanges it for a Vanilla access token. If no matching user exists in Vanilla, one will be created and an access token will be issued for them.\n\nIn order to use this endpoint, the access token calls out to the API defined in the OAuth connection so it must have a scope that has access to the user's profile or else it will fail.\n\nThe access tokens provided by this endpoint are relatively short lived, so make sure you take note of"
        },
        {
          "info": {
            "name": "Issue a JWT that includes the current user's roles as its claims",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://open.vanillaforums.com/api/v2/tokens/roles"
          },
          "docs": "This is primarily intended for internal use on client-side code to authenticate to specific API endpoints where the response generated depends on the set of roles and associated permissions, but does not depend on the identity of the requesting user.\n\nAs many users may share a limited set of roles, this approach allows for caching responses to these endpoints for short periods, to improve overall page responsiveness while reducing server-side load."
        },
        {
          "info": {
            "name": "Reveal a usable access token.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://open.vanillaforums.com/api/v2/tokens/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The numeric ID of a token.\n"
              },
              {
                "name": "transientKey",
                "value": "",
                "type": "query",
                "description": "A valid CSRF token for the current user.\n"
              },
              {
                "name": "fields",
                "value": "",
                "type": "query",
                "description": "Only return fields with these keys from the output. Use dot notation for nested fields."
              }
            ]
          },
          "docs": "Reveal a usable access token."
        },
        {
          "info": {
            "name": "Revoke an access token.",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://open.vanillaforums.com/api/v2/tokens/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The numeric ID of a token.\n"
              }
            ]
          },
          "docs": "Revoke an access token."
        }
      ]
    }
  ],
  "bundled": true
}