---
updatedAt: 2026-06-29T11:56:28.000Z
agentTools:
  projectIndex: https://docs.biot-med.com/llms.txt
---

# Get mqtt temporary credentials for device gateway

Get mqtt temporary credentials for device gateway



Path Parameters:

| Parameter   |Type   | Mandatory| Description          | Example   |
|-------------|-------|----------|----------------------|-----------|
|id|string|true|Credentials ID||


This API requires **PROTECTED_API** permission(s).



# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "BioT Organization Service",
    "description": "APIs document (version: 10.12.1)",
    "version": "10.12.1"
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/device/v2/devices/{id}/mqtt-credentials": {
      "get": {
        "tags": [
          "Temporary Credentials API"
        ],
        "summary": "Get mqtt temporary credentials for device gateway",
        "description": "Get mqtt temporary credentials for device gateway\n\n\n\nPath Parameters:\n\n| Parameter   |Type   | Mandatory| Description          | Example   |\n|-------------|-------|----------|----------------------|-----------|\n|id|string|true|Credentials ID||\n\n\nThis API requires **PROTECTED_API** permission(s).\n\n",
        "operationId": "getTempCredentialsForDevice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Credentials ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The below table describes the response parameters:\n\n| Parameter   |Type   |Description          | Example   |\n|-------------|-------|---------------------|-----------|\n|headers|object|||\n|body|object|||\n|body.endpoint|string|||\n|body.credentials|object|||\n|body.credentials.accessKeyId|string|||\n|body.credentials.secretAccessKey|string|||\n|body.credentials.sessionToken|string|||\n|body.credentials.expiration|string|||\n|body.region|string|||\n|body.connectionClientId|string|||\n|statusCodeValue|integer|||\n|statusCode|object|||\n|statusCode.is4xxClientError|boolean|||\n|statusCode.error|boolean|||\n|statusCode.is5xxServerError|boolean|||\n|statusCode.is1xxInformational|boolean|||\n|statusCode.is2xxSuccessful|boolean|||\n|statusCode.is3xxRedirection|boolean|||\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TempCredentialsForDeviceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Code : TOKEN_NOT_VALID, Details: []",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Code : ACCESS_DENIED, Details: []",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Code : DEVICE_NOT_FOUND, Details: [id]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Code : INTERNAL_SERVER_ERROR, Details: []",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "Code : GATEWAY_TIMEOUT, Details: []",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "EXAMPLE_CODE_ENTITY_NOT_FOUND"
          },
          "message": {
            "type": "string",
            "example": "Entity with id [00000000-0000-0000-0000-000000000000] not found"
          },
          "serviceName": {
            "type": "string",
            "example": "Device Service"
          },
          "traceId": {
            "type": "string",
            "example": "a07a7e532f3541d8"
          },
          "environment": {
            "type": "string",
            "example": "develop"
          },
          "details": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "Credentials": {
        "type": "object",
        "properties": {
          "accessKeyId": {
            "type": "string"
          },
          "secretAccessKey": {
            "type": "string"
          },
          "sessionToken": {
            "type": "string"
          },
          "expiration": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TempCredentialsForDeviceResponse": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "string"
          },
          "credentials": {
            "$ref": "#/components/schemas/Credentials"
          },
          "region": {
            "type": "string"
          },
          "connectionClientId": {
            "type": "string"
          }
        },
        "required": [
          "connectionClientId",
          "credentials",
          "endpoint",
          "region"
        ]
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}
```