MClimate API Documentation
  • MClimate API Documentation
  • MClimate LoRaWAN Devices
  • Basic endpoints
  • API Control - LoRaWAN devices
    • Vicki LoRaWAN
    • HT Sensor LoRaWAN
    • CO2 Sensor LoRaWAN
    • T-Valve LoRaWAN
    • Flood Sensor LoRaWAN
    • Open/Close Sensor LoRaWAN
    • Multipurpose Button LoRaWAN
    • Wireless Thermostat LoRaWAN
    • CO2 Display LoRaWAN
    • Fan Coil Thermostat LoRaWAN
  • API Control - wifi devices
    • Melissa
    • Bobbie
    • Smart Plug
    • Vicki LoRa
      • Vicki high priority commands
      • Summer Mode
    • HT Sensor LoRa
  • Functions
    • Schedules
    • Heating profiles
    • Thermostat mode
    • LoRaWAN FUOTA
    • M Token
    • Assign devices
Powered by GitBook
On this page
  • Create M Token
  • Fetch All M Tokens
  • Delete M token
  1. Functions

M Token

Authorization token for MClimate LoRaWAN Broker

PreviousLoRaWAN FUOTANextAssign devices

Last updated 1 year ago

Create M Token

Scope: Trusted

Request URL:

POST /lorawan/create-m-token

Headers:

Content-Type: application/json
Authorization: Bearer {access_token}

Body:

{
    "name": "test-token"
}

Response:

{
    "lorawan": {
        "m_token": "525932396f6666696365407365656d656c697373612e636f6d4e455452",
        "id": "63bff8d9acf3947c56093fb4",
        "created_at": "2023-01-12 14:11:05"
    },
    "_links": {
        "self": {
            "href": "/v1/lorawan/create-m-token"
        }
    }
}

Fetch All M Tokens

Scope: Trusted

Request URL:

GET /lorawan/fetch-m-tokens

Headers:

Content-Type: application/json
Authorization: Bearer {access_token}

Response:

{
    "_embedded": {
        "lorawan": [
            {
                "id": "63bd55cae6f2376c980d3952",
                "name": "test-token",
                "created_at": "2023-01-10 14:10:50",
                "_links": {
                    "self": {
                        "href": "/v1/lorawan/fetch-m-tokens"
                    }
                }
            }
        ]
    },
    "total": 1,
    "_links": {
        "self": {
            "href": "/v1/lorawan/fetch-m-tokens"
        }
    }
}

Delete M token

Scope: Trusted

Request URL:

DELETE /lorawan/delete-m-token/{m_token id}

Headers:

Content-Type: application/json
Authorization: Bearer {access_token}

Response:

{
    "lorawan": {
        "id": "63bd858fe6f2376c980d3953"
    },
    "_links": {
        "self": {
            "href": "/v1/lorawan/delete-m-token/63bd858fe6f2376c980d3953"
        }
    }
}
2KB
MToken.postman_collection.json