Swoogo Authentication API

OAuth2 client-credentials token exchange.

GitHub OpenAPI

Operations 1

POST /oauth2/token Request API Token #

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/swoogo:swoogo-authentication-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

swoogo-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Swoogo Authentication API
  version: 1.0.0
  contact:
    name: Swoogo Developer Support
    url: https://developer.swoogo.com
    email: dev@swoogo.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: https://www.swoogo.com/terms
  description: 'Operations tagged Authentication across 2 of this provider''s published API definitions: swoogo-openapi.yml, swoogo-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.swoogo.com/api/v1
  description: Production API server
- url: https://local.swoogo.com/api/v1
  description: Local API server
tags:
- name: Authentication
  description: Obtain and manage OAuth 2.0 bearer tokens for API access.
paths:
  /oauth2/token:
    post:
      tags:
      - Authentication
      summary: Request API Token
      description: '### Request API Token

        **Step 1: Find your consumer key and secret** Your consumer key and secret can be found by logging into Swoogo, and going to My Profile > API Credentials.


        **Step 2: Encode consumer key and secret** The steps to encode your consumer key and secret into a set of credentials to obtain a bearer token are: 1) URL encode the consumer key and the consumer secret according to RFC 1738. 2) Concatenate the encoded consumer key, a colon character ":", and the encoded consumer secret into a single string. 3) Base64 encode the string from the previous step.


        **Step 3: Obtain a bearer token** The value calculated in step 1 must be exchanged for a bearer token by issuing a request to POST /api/v1/oauth2/token: The request must be a HTTP POST request. The request must include an Authorization header with the value of your base 64 encoded token (from step 1). The request must include a Content-Type header with the value of application/x-www-form-urlencoded;charset=UTF-8. The body of the request must be grant_type=client_credentials.


        **Step 4: Authenticate API requests with the bearer token** The bearer token may be used to issue requests to Swoogo API endpoints. To use the bearer token, construct a normal HTTPS request and include an Authorization header with the value of your bearer token from step 2.

        > **Note:** The tokens expires in 30 minutes.'
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "# Encode your consumer key and secret as Base64\nCREDENTIALS=$(echo -n \"YOUR_CONSUMER_KEY:YOUR_CONSUMER_SECRET\" | base64)\n\ncurl -X POST \"https://api.swoogo.com/api/v1/oauth2/token\" \\\n  -H \"Authorization: Basic $CREDENTIALS\" \\\n  -H \"Content-Type: application/x-www-form-urlencoded;charset=UTF-8\" \\\n  -d \"grant_type=client_credentials\"\n"
      - lang: JavaScript
        label: Node.js
        source: "const credentials = Buffer.from(\n  `${CONSUMER_KEY}:${CONSUMER_SECRET}`\n).toString('base64');\n\nconst response = await fetch('https://api.swoogo.com/api/v1/oauth2/token', {\n  method: 'POST',\n  headers: {\n    'Authorization': `Basic ${credentials}`,\n    'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',\n  },\n  body: 'grant_type=client_credentials',\n});\n\nconst { access_token, expires_at } = await response.json();\n"
      - lang: Python
        label: Python
        source: "import base64\nimport requests\n\ncredentials = base64.b64encode(\n    f\"{CONSUMER_KEY}:{CONSUMER_SECRET}\".encode()\n).decode()\n\nresponse = requests.post(\n    \"https://api.swoogo.com/api/v1/oauth2/token\",\n    headers={\n        \"Authorization\": f\"Basic {credentials}\",\n        \"Content-Type\": \"application/x-www-form-urlencoded;charset=UTF-8\",\n    },\n    data=\"grant_type=client_credentials\",\n)\n\ntoken = response.json()[\"access_token\"]\n"
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  required: true
                  value: client_credentials
                  example: client_credentials
            examples:
              Request API Token:
                value:
                  grant_type: client_credentials
      responses:
        '200':
          description: Request API Token
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    example: '{{access-token}}'
                  expires_at:
                    type: string
                    example: '2024-11-08 16:04:40'
                  type:
                    type: string
                    example: bearer
              examples:
                Request Token:
                  value:
                    access_token: '{{access-token}}'
                    expires_at: '2024-11-08 16:04:40'
                    type: bearer
      security:
      - basicAuth: []
      operationId: postOauth2Token
      x-operation-id-source: derived
    servers:
    - url: https://api.swoogo.com/api/v1
      description: Production API server
    - url: https://local.swoogo.com/api/v1
      description: Local API server
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: access_token
      description: OAuth 2.0 bearer token obtained from `POST /oauth2/token`. Tokens expire after 30 minutes. Include in the `Authorization` header as `Bearer {access_token}`.
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication using your base64-encoded API consumer key and secret. Only used for the `POST /oauth2/token` endpoint to obtain a bearer token.
x-refined-from:
- swoogo-openapi.yml
- swoogo-openapi.yml