電話驗證

電話驗證包含兩種帳戶方法,可用來新增及驗證商家帳戶的電話號碼。透過電話驗證提交的電話號碼會取代先前透過 accounts.AccountBusinessInformation 提交的電話號碼。

我們強烈建議所有新商家和現有商家進行電話驗證。在您驗證電話號碼前,您的帳戶可能會因為帳戶狀態問題 PENDING_PHONE_VERIFICATION 而遭到停權。

以下是驗證電話號碼的必要步驟:

  1. 撥打 accounts.requestphoneverification 以提出電話驗證要求。
    輸入雙字母的區碼
    輸入你的電話號碼。
    選擇驗證方法 (SMSPHONE_CALL)。
  2. 請撥打 accounts.verifyphonenumber 驗證電話號碼。
    輸入步驟 1 的verificationId
    請輸入您傳送至手機的 6 位數 verificationCode
    輸入使用的 phoneVerificationMethod
    這項呼叫會傳回 verifiedPhoneNumber。這組電話號碼已通過驗證。

您可以在 AccountBusinessInformation.phoneVerificationStatus 中查看帳戶的電話驗證狀態。

accounts.requestphoneverification

phoneRegionCodephoneNumberphoneVerificationMethod 傳遞至 accounts.requestphoneverification,即可啟動電話號碼驗證程序。這個呼叫會傳回 verificationId

您可以使用選填的 languageCode 欄位,以預設語言 (美式英文) 以外的語言進行驗證。

您可以嘗試每四小時驗證同一組電話號碼最多 5 次。

POST https://www.googleapis.com/content/v2.1/merchantId/accounts/accountId/requestphoneverification

以下是呼叫範例:

{
  "phoneRegionCode": "US",
  "phoneNumber": "phoneNumber",
  "phoneVerificationMethod": "SMS",
  "languageCode": "en-US"
}

回應範例如下:

{
  "verificationId": "2-47b7ef80ff494daf8079f4808e750dcb-1626331725036"
}

accounts.verifyphonenumber

驗證帳戶的電話號碼時,請將 verificationId、傳送至手機的 6 位數 verificationCode 和您使用的 phoneVerificationMethod (例如 SMS) 傳遞至 accounts.verifyphonenumberaccounts.requestphoneverification這個呼叫會以您所在區域的標準 FMV 傳回經過驗證的電話號碼。

您的初始驗證要求會在 15 分鐘後失效。之後,您必須提出新的電話驗證要求,才能呼叫 accounts.verifyphonenumber

POST https://www.googleapis.com/content/v2.1/merchantId/accounts/accountId/verifyphonenumber

以下是呼叫範例:

{
  "verificationId": "verificationId",
  "verificationCode": "verificationCode",
  "phoneVerificationMethod": "SMS"
}

回應範例如下:

{
  "verifiedPhoneNumber": "(123) 456-7890"
}

AccountBusinessInformation.phoneVerificationStatus

您可以在 AccountBusinessInformation.phoneVerificationStatus 欄位中查看帳戶的電話驗證狀態。

使用 accountIdmerchantId 呼叫 accounts.get 方法,查看帳戶的商家資訊

GET https://www.googleapis.com/content/v2.1/v2.1/merchantId/accounts/accountId