Enrollmenttokens: create

企業の登録トークンを作成します。このメソッドは EnrollmentTokensService の一部です。

リクエスト

HTTP リクエスト

POST https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/enrollmentTokens

パラメータ

パラメータ名 説明
パスパラメータ
enterpriseId string 企業の ID。

承認

このリクエストには、次のスコープによる認証が必要です。

スコープ
https://www.googleapis.com/auth/androidenterprise

詳細については、認証と認可のページをご覧ください。

リクエストの本文

リクエストの本文には、以下の構造を使用してデータを指定してください。

{
  "kind": "androidenterprise#enrollmentToken",
  "token": string,
  "enrollmentTokenType": string,
  "duration": {
    "seconds": long,
    "nanos": integer
  },
  "googleAuthenticationOptions": {
    "authenticationRequirement": string,
    "requiredAccountEmail": string
  }
}
プロパティ名 説明 メモ
kind string
token string デバイスに渡され、デバイスの登録を承認するトークン値。サーバーによって生成される読み取り専用のフィールドです。
enrollmentTokenType string [必須] 登録トークンのタイプ。

有効な値は次のとおりです。
  • "enrollmentTokenTypeUnspecified"
  • "userDevice"
  • userlessDevice
duration nested object [省略可] 登録トークンが有効な期間。1 分から Durations.MAX_VALUE(約 10,000 年)までの範囲で指定します。指定しない場合、デフォルトの期間は 1 時間です。
duration.seconds long 期間の符号付き秒数。
googleAuthenticationOptions nested object [省略可] 登録時に Google 認証に関連するオプションを提供します。
googleAuthenticationOptions.authenticationRequirement string [省略可] 登録時にユーザーが Google で認証する必要があるかどうかを指定します。指定した場合、このトークンでデバイスが登録されるときに、エンタープライズ リソースGoogleAuthenticationSettings をオーバーライドします。

有効な値は次のとおりです。
  • "authenticationRequirementUnspecified"
  • "optional"
  • required
googleAuthenticationOptions.requiredAccountEmail string [省略可] 登録時にユーザーが使用する必要がある管理対象 Google アカウントを指定します。このフィールドが設定されている場合は、AuthenticationRequirementREQUIRED に設定する必要があります。

レスポンス

成功すると、このメソッドは次の構造を含むレスポンスの本文を返します。

{
  "kind": "androidenterprise#enrollmentToken",
  "token": string,
  "enrollmentTokenType": string,
  "duration": {
    "seconds": long,
    "nanos": integer
  },
  "googleAuthenticationOptions": {
    "authenticationRequirement": string,
    "requiredAccountEmail": string
  }
}
プロパティ名 説明 メモ
kind string
token string デバイスに渡され、デバイスの登録を承認するトークン値。サーバーによって生成される読み取り専用のフィールドです。
enrollmentTokenType string [必須] 登録トークンのタイプ。

有効な値は次のとおりです。
  • "enrollmentTokenTypeUnspecified"
  • "userDevice"
  • userlessDevice
duration nested object [省略可] 登録トークンが有効な期間。1 分から Durations.MAX_VALUE(約 10,000 年)までの範囲で指定します。指定しない場合、デフォルトの期間は 1 時間です。
duration.seconds long 期間の符号付き秒数。
googleAuthenticationOptions nested object [省略可] 登録時に Google 認証に関連するオプションを提供します。
googleAuthenticationOptions.authenticationRequirement string [省略可] 登録時にユーザーが Google で認証する必要があるかどうかを指定します。この設定が指定されている場合、このトークンで登録されたデバイスでは、企業リソースに指定された GoogleAuthenticationSettings は無視されます。

有効な値は次のとおりです。
  • "authenticationRequirementUnspecified"
  • "optional"
  • required
googleAuthenticationOptions.requiredAccountEmail string [省略可] 登録時にユーザーが使用する必要がある管理対象 Google アカウントを指定します。AuthenticationRequirementREQUIRED if this field is set. に設定する必要があります。