メインコンテンツへスキップ
POST
/
device-credentials
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.deviceCredentials.createPublicKey({
        deviceName: "device_name",
        type: "public_key",
        value: "value",
        deviceId: "device_id",
    });
}
main();
{
  "id": "dcr_0000000000000001"
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

ボディ

device_name
string
必須

Name for this device easily recognized by owner.

Minimum string length: 1
type
enum<string>
必須

Type of credential. Must be public_key.

利用可能なオプション:
public_key
value
string
必須

Base64 encoded string containing the credential.

Minimum string length: 1
device_id
string
必須

Unique identifier for the device. Recommend using Android_ID on Android and identifierForVendor.

Maximum string length: 36
Pattern: ^[-A-Fa-f0-9]+$
client_id
string<client-id>

client_id of the client (application) this credential is for.

レスポンス

Device credentials successfully created.

id
string
デフォルト:dcr_0000000000000001
必須

The credential's identifier