Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function main() {
// Create a phone number builder.
var phoneNumberBuilder = AdsApp.extensions().newPhoneNumberBuilder();
// Create a phone number operation.
var phoneNumberOperation = phoneNumberBuilder
.withCountry("IR") // required
.withPhoneNumber("02188888888") // required
.withMobilePreferred(true) // optional
.build();
// Optional: examine the outcome. The call to isSuccessful()
// will block until the operation completes.
if (phoneNumberOperation.isSuccessful()) {
// Get the result.
var phoneNumber = phoneNumberOperation.getResult();
} else {
// Handle the errors.
var errors = phoneNumberOperation.getErrors();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.