This is an archive version of the document. To get the most up-to-date information, see the current version.

Getting Device Code

This section explains how to get a device code.

Request

GET https://<hostname>/api/v1/accounts/created/getDeviceCode

Request Headers

The request header must contain an authorization token of the current session.

Request Parameters

None.

Request Body

None.

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns a response code 200 (OK).

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTPS headers.

Header

Description

Content-length

The length of the response body.

Content-type

The media type and syntax of the response body message: application/json; charset=utf-8

Response Body

Property

Type

Description

userCode

string

Shows the user code.

deviceCode

string

Shows the device code.

verificationUrl

string

Shows the verification URL.

expiresOn

string

Shows the date on which the received code expires.

interval

string

Shows the interval.

message

string

Shows the message.

clientId

string

Shows the identification number of the client.

resource

string

Shows the resource URL.

Example

Request:

GET https://abc.ukwest.cloudapp.azure.com/api/v1/accounts/created/getDeviceCode

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200 OK

 

Response Body:

{

  "userCode": "D7FUNM6QD",

  "deviceCode": "DAQABAAEAAABeAFzDwllzTYGDLh_qYbH86YNMudW4a1yo6q_sEdMRmGex3DZRGkAgNWghOyBNwRTq66lzEj5z2OS_4hW4xWP55myO4lmEHn3dlqJ4EohZU0V3ZsaXW4fmb6aLPxka_xxm2ZZhhmJ1jSJGZYFzU_ygxzAE3FyHKCl2X5iBp0Hp9AYVvI3fZchauj7nqxKE9vwgAA",

  "verificationUrl": "https://microsoft.com/devicelogin",

  "expiresOn": "2020-02-03T07:55:53.026829+00:00",

  "interval": 5,

  "message": "To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code D7FUNM6QD to authenticate.",

  "clientId": "80b03795-8ddb-261a-nbee-02f9e1bl7b46",

  "resource": "https://management.core.windows.net/"

}

I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.