電話驗證

電話驗證包含兩種帳戶方法,可用來新增及驗證商家帳戶的電話號碼。透過電話驗證提交的電話號碼會取代您透過 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 欄位,使用預設值 (美式英文) 以外的語言進行驗證。

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

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

verificationIdaccounts.requestphoneverification、傳送到手機的 verificationCode 位數 verificationCode 以及您使用的 phoneVerificationMethod (例如 SMS) 傳遞至 accounts.verifyphonenumber,藉此驗證帳戶的電話號碼。這類通話會以您所在區域的標準形式傳回通過驗證的電話號碼。

初始驗證要求會在 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