1

//パラメータ

var params = {
"auth":auth,
"kind": "reseller#customer",
"customerId": "customerId",
"customerDomain": "customer domain",
"postalAddress": {
  "kind": "customers#address",
  "contactName": "John Doe",
  "organizationName": "Example Inc",
  "postalCode": "94043",
  "countryCode": "US",

},
"alternateEmail": "email address  "

} //API を使用

var service = google.reseller('v1');
service.customers.insert(params,function(err,data){
   console.log(err);
   console.log(data); 
})

このエラーが発生しています:

{ [Error: Invalid Value]
  code: 400,
  errors: [ { domain: 'global', reason: 'invalid', message: 'Invalid Value' } ] }
4

2 に答える 2

0

問題はエラーログにすでに記載されています。

理由: メッセージ: '無効な値'

"auth":authCustomers リソースには含まれません。

有効な値は次のとおりです。

{
  "kind": "reseller#customer",
  "customerId": string,
  "customerDomain": string,
  "postalAddress": {
    "kind": "customers#address",
    "contactName": string,
    "organizationName": string,
    "locality": string,
    "region": string,
    "postalCode": string,
    "countryCode": string,
    "addressLine1": string,
    "addressLine2": string,
    "addressLine3": string
  },
  "phoneNumber": string,
  "alternateEmail": string,
  "resourceUiUrl": string,
  "customerDomainVerified": boolean
}
于 2016-09-03T08:11:17.550 に答える
0

requestモジュールを使用して、このアクションを簡単に実行できます。

customerこれは実行を挿入する例です

役職https://www.googleapis.com/apps/reseller/v1/customers

    Body parameter

  {
  "kind": "reseller#customer",
  "customerId": "custId-1234",
  "customerDomain": "example.com",
  "postalAddress": {
    "kind": "customers#address",
    "contactName": "John Doe",
    "organizationName": "Example Inc",
    "postalCode": "94043",
    "countryCode": "US",
  },
  "alternateEmail": "alternateEmail@google.com"
}

詳細について

于 2016-09-02T05:02:58.477 に答える