All Products
Search
Document Center

Identity as a Service:GenerateDeviceCode

Last Updated:Jun 10, 2026

Menghasilkan kode perangkat.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Sintaks permintaan

POST /v2/{instanceId}/{applicationId}/oauth2/device/code HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

Yes

ID instans.

idaas_ue2jvisn35ea5lmthk267xxxxx

applicationId

string

Yes

ID aplikasi.

app_mkv7rgt4d7i4u7zqtzev2mxxxx

Parameter permintaan

Parameter

Type

Required

Description

Example

scope

string

No

Cakupan otorisasi (dalam OAuth).

xxx

Elemen respons

Element

Type

Description

Example

object

The response parameters.

device_code

string

The device code.

xxxxx

user_code

string

The user authorization code.

xxxxx

verification_uri

string

The verification URI.

https://example.com/authorize/device

verification_uri_complete

string

The complete verification URI.

https://example.com/authorize/device?user_code= xxxx

expires_in

integer

The remaining validity period of the device code. Unit: seconds.

1200

expires_at

integer

The time when the token expires. This value is a UNIX timestamp representing the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1653288641

interval

integer

The timeout period of the request token. Unit: seconds.

5

Contoh

Respons sukses

JSONformat

{
  "device_code": "xxxxx",
  "user_code": "xxxxx",
  "verification_uri": "https://example.com/authorize/device",
  "verification_uri_complete": "https://example.com/authorize/device?user_code=\nxxxx",
  "expires_in": 1200,
  "expires_at": 1653288641,
  "interval": 5
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.