Hello,
I am trying to upload offline click conversion using REST API.
For this purpose I am using below request:
curl -f --request POST "https://googleads.googleapis.com/v12/customers/${customerId}:uploadClickConversions" \
--header "Content-Type: application/json" \
--header "developer-token: ${developer-token-from-manager-account}" \
--header "login-customer-id: ${manager-account-id}" \
--header "Authorization: Bearer ${my-access-token}" \
--data '{
"conversions": [
{
"gclid": ${my-gclid},
"conversionAction": "customers/${customerId}/conversionActions/${conversionId}",
"conversionDateTime": "2022-12-21 12:32:45"
}
],
"partialFailure": true,
"validateOnly": false,
"debugEnabled": true
}'
In response I get this error:
{
"error": {
"status": "PERMISSION_DENIED",
"message": "The caller does not have permission",
"code": 403,
"details": [
{
"errors": [
{
"errorCode": {
"authorizationError": "USER_PERMISSION_DENIED"
},
"message": "User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid"
}
],
"@type": "type.googleapis.com/google.ads.googleads.v12.errors.GoogleAdsFailure",
"requestId": "z71WgTEVZ9Ye7wP4hjCG0g"
}
]
}
}
Could you verify what I am missing to send the request correctly? How to set up connections between a manager account and a user account?
Thanks in advance!
|
||||||