Docs / Authentication API

Authentication API

API endpoints for authentication and token management

Authentication API

The Authentication API allows you to generate and manage access tokens for the APIMW platform.

Base URL

https://api.apimw.com/v1/auth

Endpoints

Method Endpoint Description
POST /token Generate a new access token
POST /refresh Refresh an expired access token
POST /revoke Revoke an access token
GET /me Get current user information

Authentication Flow

  1. Generate Token - Use your API Key and Secret to get an access token
  2. Use Token - Include the token in API requests
  3. Refresh Token - Get a new token when the current one expires
  4. Revoke Token - Invalidate a token when no longer needed

Error Codes

Code Description
INVALID_CREDENTIALS API Key or Secret is incorrect
EXPIRED_TOKEN The access token has expired
INVALID_TOKEN The token is malformed or invalid
REVOKED_TOKEN The token has been revoked

In This Section

POST Generate Token

Generate an access token using API credentials

POST Refresh Token

Refresh an expired access token

POST Revoke Token

Revoke an access token

GET Get Current User

Get the current authenticated user information