Hi I use the same ClientConn to send a request, one of which is successful, 
but the other fails

The prompt when it failed was :
```bash
rpc error: code = Unauthenticated desc = Request is missing required 
authentication credential. Expected OAuth 2 access token, login cookie or 
other valid authentication credential. See 
https://developers.google.com/identity/sign-in/web/devconsole-project.
```
This is my code:
```go
headers := metadata.Pairs(
"authorization", "Bearer "+accessToken,
"developer-token", developerToken,
"login-customer-id", customerID,
)
ctx := context.Background()
ctx = metadata.NewOutgoingContext(ctx, headers)

cred := grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(nil, 
""))
conn, err := grpc.Dial("googleads.googleapis.com:443", cred)
```

```go
customerServiceClient := services.NewCustomerServiceClient(conn)
accessibleCustomers, err := customerServiceClient.ListAccessibleCustomers(
ctx,
&services.ListAccessibleCustomersRequest{},
)
```
I can get the correct return information from ListaccessibleCustomers

```go
campaignServiceClient := services.NewCampaignServiceClient(conn)
campaigns, err := campaignServiceClient.MutateCampaigns(ctx, campaign)
```
Campaign objects have been created in the code
Mutatecampaigns will prompt me to lack authentication 

Is there a different verification method different interface?

Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/550e96ce-a884-4e2c-ac58-23474273c60dn%40googlegroups.com.
  • Do... knepp harr
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to