Create a new API token in the application to use in the IoT Central public API. The token value will be returned in the response, and won't be returned again in subsequent requests.

put/apiTokens/{tokenId}

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    OAuth 2
    Implicithttps://login.microsoftonline.com/common/oauth2/authorize
    Scopesuser_impersonation

Path parameters

tokenIdstring required

Unique ID for the API token.

Query parameters

api-versionstring required

The version of the API being called.

Request body

idstring

Unique ID of the API token.

tokenstring

Value of the API token.

expirystring date-time

String-formatted date representing the time when the token expires.

Response

Success

idstring

Unique ID of the API token.

tokenstring

Value of the API token.

expirystring date-time

String-formatted date representing the time when the token expires.

Changes

No recorded changes to this operation across all 8 revisions of this API.