Red Hat 3scale O Auth API

OAuth 2.0 token authorization endpoints

GitHub OpenAPI

Operations 3

GET /transactions/oauth_authorize.xml Authorize (OAuth authentication mode pattern) #
GET /transactions/oauth_authrep.xml AuthRep (OAuth authentication mode pattern) #
POST /transactions.xml Report #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/red-hat-3scale:red-hat-3scale-oauth-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

red-hat-3scale-oauth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Red Hat 3scale OAuth API
  version: '1.0'
  description: 'Operations tagged OAuth across 2 of this provider''s published API definitions: red-hat-3scale-porta-service_management_api.json, red-hat-3scale-service-management-porta-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: /
- url: https://su1.3scale.net
tags:
- name: OAuth
paths:
  /transactions/oauth_authorize.xml:
    get:
      summary: Authorize (OAuth authentication mode pattern)
      operationId: authorizeOauth
      description: 'Read-only operation to authorize an application in the OAuth authentication pattern.


        When using this endpoint please pay attention at your handling of app_id and app_key parameters. If you don''t specify an app_key, the endpoint assumes the app_id specified has already been authenticated by other means. If you specify the app_key parameter, even if it is empty, it will be checked against the application''s keys. If you don''t trust the app_id value you have, use app keys and specify one.


        This calls returns extra data (secret and redirect_url) needed to power OAuth APIs. It''s only available for users with OAuth enabled APIs.


        It is used to check if a particular application exists, is active and is within its usage limits. It can be optionally used to authenticate a call using an application key. It''s possible to pass a ''predicted usage'' to the authorize call. This can serve three purposes:

        1) To make sure an API call won''t go over the limits before the call is made, if the usage of the call is known in advance. In this case, the estimated usage can be passed to the authorize call, and it will respond whether the actual API call is still within limit.

        2) To limit the authorization only to a subset of metrics. If usage is passed in, only the metrics listed in it will be checked against the limits. For example: There are two metrics defined: _searches_ and _updates_. _updates_ are already over limit, but _searches_ are not. In this case, the user should still be allowed to do a search call, but not an update one.


        3) If no usage is passed then any metric with a limit exceeded state will result in an _authorization_failed_ response.


        **Note:** Even if the predicted usage is passed in, authorize is still a **read-only** operation. You have to make the report call to report the usage.


        The response can have an HTTP response code: `200` OK (if authorization is granted), `409` (if it''s not granted, typically application over limits or keys missing, check ''reason'' tag), `403` (for authentication errors, check ''error'' tag) and `404` (not found).'
      tags:
      - OAuth
      parameters:
      - name: service_token
        in: query
        description: Service token for the API service.
        required: true
        schema:
          type: string
        x-data-threescale-name: service_tokens
      - name: service_id
        in: query
        description: Service ID.
        x-data-threescale-name: service_ids
        required: true
        schema:
          type: integer
      - name: app_id
        in: query
        description: Client ID (identifier of the application if the authentication pattern is OAuth, note that client_id == app_id)
        x-data-threescale-name: app_ids
        schema:
          type: string
      - name: app_key
        in: query
        description: App Key (shared secret of the application). The app key, if present, must match a key defined for the application. Note that empty values are considered invalid.
        x-data-threescale-name: app_keys
        schema:
          type: string
      - name: referrer
        in: query
        description: Referrer IP Address or Domain. Required only if referrer filtering is enabled. If special value '*' (wildcard) is passed, the referrer check is bypassed.
        schema:
          type: string
      - name: usage
        in: query
        description: 'Predicted usage. Actual usage will need to be reported with a report or an authrep call.


          The usage object (see <a href="#model-Usage">Usage</a> schema for definition) may contain multiple fields, where the keys are metrics'' system names, and the values are the reported usage.'
        schema:
          $ref: '#/components/schemas/Usage'
        style: deepObject
        explode: true
      - name: redirect_url
        in: query
        description: Optional redirect URL for OAuth. Will be validated if sent.
        schema:
          type: string
      - name: redirect_uri
        in: query
        description: Optional redirect URI for OAuth. This is the same as 'redirect_url', but if used you should expect a matching 'redirect_uri' response field.
        schema:
          type: string
      responses:
        default:
          description: success
          content: {}
    servers:
    - url: /
  /transactions/oauth_authrep.xml:
    get:
      summary: AuthRep (OAuth authentication mode pattern)
      operationId: authrepOauth
      description: 'AuthRep is a ''one-shot'' operation to authorize an application and report the associated transaction at the same time in the OAuth authentication pattern.


        The main difference between this call and the regular authorize call is that usage will be reported if the authorization is successful. Authrep is the most convenient way to integrate your API with the 3scale''s Service Manangement API since it does a 1:1 mapping between a request to your API and a request to 3scale''s API.


        If you do not want to do a request to 3scale for each request to your API or batch the reports you should use the Authorize and Report methods instead.


        Authrep is **not a read-only** operation and will increment the values if the authorization step is a success.


        When using this endpoint please pay attention at your handling of app_id and app_key parameters. If you don''t specify an app_key, the endpoint assumes the app_id specified has already been authenticated by other means. If you specify the app_key parameter, even if it is empty, it will be checked against the application''s keys. If you don''t trust the app_id value you have, use app keys and specify one.


        This call returns extra data (secret and redirect_url) needed to power OAuth APIs. It''s only available for users with OAuth enabled APIs.'
      tags:
      - OAuth
      parameters:
      - name: service_token
        in: query
        description: Service token for the API service.
        required: true
        schema:
          type: string
        x-data-threescale-name: service_tokens
      - name: service_id
        in: query
        description: Service ID.
        x-data-threescale-name: service_ids
        required: true
        schema:
          type: integer
      - name: app_id
        in: query
        description: Client ID (identifier of the application if the authentication pattern is OAuth, note that client_id == app_id)
        x-data-threescale-name: app_ids
        schema:
          type: string
      - name: app_key
        in: query
        description: App Key (shared secret of the application). The app key, if present, must match a key defined for the application. Note that empty values are considered invalid.
        x-data-threescale-name: app_keys
        schema:
          type: string
      - name: referrer
        in: query
        description: Referrer IP Address or Domain. Required only if referrer filtering is enabled. If special value '*' (wildcard) is passed, the referrer check is bypassed.
        schema:
          type: string
      - name: usage
        in: query
        description: 'Usage will increment the metrics with the values passed. The value can be only a positive integer (e.g. 1, 50). Reporting usage[hits]=1 will increment the hits counter by +1.


          The usage object (see <a href="#model-Usage">Usage</a> schema for definition) may contain multiple fields, where the keys are metrics'' system names, and the values are the reported usage.'
        schema:
          $ref: '#/components/schemas/Usage'
        style: deepObject
        explode: true
      - name: log
        in: query
        description: Request Log allows to log status codes of your API back to 3scale to maintain a log of the latest activity on your API. Request Logs are optional and not available in all 3scale plans.
        schema:
          $ref: '#/components/schemas/Log'
        style: deepObject
        explode: true
      - name: redirect_url
        in: query
        description: Optional redirect URL for OAuth. Will be validated if sent.
        schema:
          type: string
      - name: redirect_uri
        in: query
        description: Optional redirect URI for OAuth. This is the same as 'redirect_url', but if used you should expect a matching 'redirect_uri' response field.
        schema:
          type: string
      responses:
        default:
          description: success
          content: {}
    servers:
    - url: /
  /transactions.xml:
    post:
      summary: Report
      operationId: report
      description: 'Report the transactions to 3scale backend.


        This operation updates the metrics passed in the usage parameter. You can send up to 1K transactions in a single POST request. Transactions are processed asynchronously by the 3scale''s backend.


        Transactions from a single batch are reported only if all of them are valid. If there is an error in processing of at least one of them, none is reported.


        Note that a batch can only report transactions to the same service, `service_id` is at the same level as `service_token`. Multiple report calls will have to be issued to report transactions to different services.


        Be aware that reporting metrics that are limited at the time of reporting will have no effect.


        Supported Content-Type values for this POST call are: `application/x-www-form-urlencoded`.'
      tags:
      - OAuth
      requestBody:
        description: Transactions to be reported. There is a limit of 1000 transactions to be reported on a single request.
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                service_token:
                  type: string
                  description: Service token for the API service.
                service_id:
                  type: integer
                  description: Service ID.
                  x-data-threescale-name: service_ids
                transactions:
                  $ref: '#/components/schemas/Transactions'
              required:
              - service_token
              - service_id
              - transactions
            encoding:
              transactions:
                contentType: application/x-www-form-urlencoded
                style: deepObject
                explode: true
      responses:
        default:
          description: success
          content: {}
    servers:
    - url: /
components:
  schemas:
    Usage:
      type: object
      additionalProperties:
        type: integer
      example:
        hits: 1
    Log:
      type: object
      properties:
        code:
          type: string
          example: 200
    Transaction:
      type: object
      properties:
        user_key:
          type: string
          description: User Key (API key) - identifier and shared secret of the application if the authentication pattern is API Key.
          x-data-threescale-name: user_keys
        app_id:
          type: string
          description: App Id (identifier of the application if the authentication pattern is App ID / App Key).
          x-data-threescale-name: app_ids
        timestamp:
          type: string
          description: 'If passed, it should be the time when the transaction took place.

            Timestamp must be within the following range: 24 hours before and 1

            hour after the current time. Two formats are supported:

            - `YYYY-MM-DD HH:MM:SS` for UTC, add `-HH:MM` or `+HH:MM` for time offset, e.g. `2022-02-01 22:15:31 -08:00`

            - Unix epoch timestamp in seconds, e.g. `1643750131`'
          example: '2022-02-01 22:15:31 -08:00'
        usage:
          $ref: '#/components/schemas/Usage'
        log:
          $ref: '#/components/schemas/Log'
      example:
        user_key: example
        usage:
          hits: 1
    Transactions:
      type: array
      description: Array of transaction details (see <a href="#model-Transaction">Transaction</a> definition). All transactions must include either `user_key` or `app_id` (the same for all transactions), depending on the API's authentication pattern. Transactions may optionally include the `timestamp` field.
      items:
        $ref: '#/components/schemas/Transaction'
x-refined-from:
- red-hat-3scale-porta-service_management_api.json
- red-hat-3scale-service-management-porta-openapi.yml