Afero Cloud Authentication API

The OAuth 2.0 token endpoint for the Afero Cloud. A partner authenticates with HTTP Basic using the OAuth Client ID and Client Secret issued in the Afero Profile Editor, posts the end-user credentials with grant_type=password, and receives a bearer access token (scope "partner account") that expires in approximately four hours and is sent on every subsequent Afero Cloud API request.

Operations 1

POST /oauth/token OAuth Authentication #

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/authentication-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

afero-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Afero Cloud Authentication API
  version: v1
  description: 'The Afero Cloud API is the RESTful control plane for the Afero IoT platform: it lists the devices and users on an Afero account, reports real-time device state, executes attribute read/write actions against connected devices, and manages the over-the-air (OTA) firmware pipeline — firmware types, firmware pool images, binary upload, device-type associations, firmware tags, and firmware pushes.'
  contact:
    name: Afero Developer Documentation
    url: https://afero-docs.readthedocs.io/en/latest/CloudAPIs/
    email: sales@afero.io
  license:
    name: Afero Developer Terms of Service
    url: https://cdn.afero.io/tos/developer/v1/developer.html
  x-apievangelist-derived-from: https://afero-docs.readthedocs.io/en/latest/CloudAPIs/
  x-apievangelist-derived-on: '2026-08-02'
  x-apievangelist-provider-published: false
servers:
- url: https://api.afero.io
  description: Afero Cloud API production base URL
security:
- bearerAuth: []
tags:
- name: Authentication
  description: OAuth 2.0 token issuance for Afero Cloud API access.
  externalDocs:
    url: https://afero-docs.readthedocs.io/en/latest/API-OAuthEndpoints/
paths:
  /oauth/token:
    post:
      operationId: createAccessToken
      tags:
      - Authentication
      summary: OAuth Authentication
      description: 'Authenticate an end-user and generate an OAuth 2.0 access token used to authenticate subsequent requests on behalf of that end-user. The Authorization header is HTTP Basic: the string `Basic ` followed by the Base64 encoding of `:`. The returned access token expires (the docs note approximately four hours; the `expires_in` value is in seconds).'
      externalDocs:
        url: https://afero-docs.readthedocs.io/en/latest/API-OAuthEndpoints/
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TokenRequest'
      responses:
        '200':
          description: An OAuth 2.0 access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessToken'
              example:
                access_token: 12345678-90AB-CDEF-0123-FED789CBA432
                token_type: bearer
                expires_in: 16086
                scope: partner account
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - basicAuth: []
components:
  responses:
    Unauthorized:
      description: Full authentication is required to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            timestamp: 1785679681261
            status: 401
            error: unauthorized
            error_description: Full authentication is required to access this resource
            service_name: ClientApi
            region: us-west-2
  schemas:
    Error:
      type: object
      description: The Afero Cloud API error envelope, observed live on api.afero.io (2026-08-02).
      properties:
        timestamp:
          type: integer
          description: Epoch milliseconds the error was produced.
        status:
          type: integer
          description: The HTTP status code.
        error:
          type: string
          description: The short error code, e.g. `unauthorized`.
        error_description:
          type: string
          description: Human readable description of the error.
        service_name:
          type: string
          description: The Afero service that produced the error, e.g. `ClientApi`.
        region:
          type: string
          description: The Afero cloud region, e.g. `us-west-2`.
    AccessToken:
      type: object
      properties:
        access_token:
          type: string
          description: The bearer access token.
        token_type:
          type: string
          description: The token type; `bearer`.
        expires_in:
          type: integer
          description: Seconds until the token expires.
        scope:
          type: string
          description: Space-delimited granted scopes, e.g. `partner account`.
    TokenRequest:
      type: object
      required:
      - username
      - password
      - grant_type
      properties:
        username:
          type: string
          description: The end-user's Afero username (email address).
        password:
          type: string
          format: password
          description: The end-user's Afero password.
        grant_type:
          type: string
          enum:
          - password
          description: The OAuth 2.0 grant type.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'The OAuth 2.0 access token returned by POST /oauth/token, sent as `Authorization: Bearer <access_token>`. Tokens expire (approximately four hours per the Afero docs).'
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic with the partner OAuth Client ID as username and OAuth Client Secret as password, used only on POST /oauth/token.
externalDocs:
  description: Afero Developer Docs
  url: https://afero-docs.readthedocs.io/en/latest/