---
agentTools:
  projectIndex: https://developer.mxmerchant.com/llms.txt
---

# Getting JWT using Consumer/Secret Keys

IMPORTANT- ensure that authorization: basic {base64 encoded value:secret} is passed in the headers as a key-value pair when authenticating with the consumer key and secret!!

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Security API",
    "version": "1.00"
  },
  "servers": [
    {
      "url": "https://api2.mxmerchant.com/security"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/application/merchantId/{merchantId}/token": {
      "get": {
        "summary": "Getting JWT using Consumer/Secret Keys",
        "description": "",
        "operationId": "getting-jwt-using-consumersecret-keys",
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "description": "Merchant Id",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "base 64 encoded version of api key: api secret. INCLUDE THE COLON.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "Response: {\"processorName\":\"{Your Processor}\",\"jwtToken\":\"xxxxxxxxxxxxxx----YOUR-JWT-TOKEN----xxxxxxxxxxxxxxxxxxxxxxxxxx\"}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "644bb860dd3d4600261d0deb:644bb860dd3d4600261d0e58"
}
```