Method: accounts.verifyIosClient

驗證 iOS 用戶端是否為實際的 iOS 裝置。如果要求有效,回應中就會傳送收據,並透過 Apple 推播通知服務傳送密鑰。用戶端應在後續呼叫 (例如 /accounts:sendVerificationCode) 中將這兩者傳回至特定 Identity Platform API,以便驗證用戶端。要求標頭中必須包含軟體包 ID,格式為 x-ios-bundle-identifier

如要識別 Google Cloud 專案,請在要求中提供 API 金鑰

HTTP 要求

POST https://identitytoolkit.googleapis.com/v1/accounts:verifyIosClient

這個網址使用 gRPC 轉碼語法。

要求主體

要求主體包含下列結構的資料:

JSON 表示法
{
  "appToken": string,
  "isSandbox": boolean
}
欄位
appToken

string

iOS 用戶端註冊 APNs (Apple 推播通知服務) 後取得的裝置權杖。

isSandbox

boolean

應用程式權杖是否位於 iOS 沙箱中。如果為 false,表示應用程式權杖位於正式環境。

回應主體

accounts.verifyIosClient 的回應訊息。

如果成功,回應主體會含有以下結構的資料:

JSON 表示法
{
  "receipt": string,
  "suggestedTimeout": string
}
欄位
receipt

string

收到應用程式權杖驗證成功的通知。

suggestedTimeout

string (int64 format)

建議的秒數,用於客戶等待推播通知的時間。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/identitytoolkit
  • https://www.googleapis.com/auth/cloud-platform

詳情請參閱 Authentication Overview