---
title: Generate a Bearer Token
slug: api
docTags: 
createdAt: 2025-07-09T04:45:50.204Z
---

{
  "id": "jEHotT5OQheB-mEAITRf0",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.monoova.com/au/security/oauth-v1/Token",
    "servers": [
      {
        "url": "https://api.monoova.com/au/security/oauth-v1/Token",
        "description": "Production URL"
      },
      {
        "url": "https://sand-api.monoova.com/au/security/oauth-v1/Token",
        "description": "Sandbox URL"
      }
    ],
    "name": "Generate a Bearer Token",
    "description": "<p>Generate a bearer token. This is a short lived token that expires after 60 minutes. This endpoint uses Basic Authentication, which is encoded using your Username and Password.\n\nYour username is your mAccount number.\nPassword is your API key.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "basicAuth",
          "name": "basicAuth",
          "kind": "optional",
          "type": "http",
          "scheme": "basic"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "7HdZsiaN2JZvL65aw11Wt",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.monoova.com/au/security/oauth-v1/Token \\\n     --header 'accept: application/json'"
        },
        {
          "id": "wQZq83AC793w9djWnRPg-",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.monoova.com/au/security/oauth-v1/Token\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "rUZEUO3W5l6OeYckRQYrH",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.monoova.com/au/security/oauth-v1/Token\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "2URaG8RSuglUTxd4ivNek",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.monoova.com/au/security/oauth-v1/Token\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "7HdZsiaN2JZvL65aw11Wt"
    },
    "results": {
      "languages": [
        {
          "id": "J_g4PkgpGCQu59j2nA0jo",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "J_g4PkgpGCQu59j2nA0jo"
    }
  },
  "children": [
    {
      "id": "8Rx59nx7-yepSMRIJtaYC",
      "type": "paragraph",
      "children": [
        {
          "text": "Generate a bearer token. This is a short lived token that expires after 60 minutes. This endpoint uses Basic Authentication, which is encoded using your Username and Password."
        },
        {
          "text": ""
        },
        {
          "text": ""
        },
        {
          "text": "Your username is your mAccount number."
        },
        {
          "text": ""
        },
        {
          "text": "Password is your API key."
        }
      ]
    }
  ]
}