ACTION_NOT_PERMITTED when trying to create SharedSet

45 views
Skip to first unread message

Ionut Voda

unread,
Sep 18, 2024, 9:48:47 AM9/18/24
to Google Ads API and AdWords API Forum
Hi there,

I've got an ACTION_NOT_PERMITTED error when trying to create SharedSet. I am using Python with the latest version of Google Ads lib (v17).
The user used in this requests has "Standard" access to the account where I want to create the shared set on, which should be enough in terms of rights.

Please find below the full request/response trace:

Request made: ClientCustomerId: xxxx, Host: googleads.googleapis.com, Method: /google.ads.googleads.v17.services.SharedSetService/MutateSharedSets, RequestId: hv-aC6rpg9rx-vW3YSZyHQ, IsFault: True, FaultMessage: The user does not have permission to perform this action on the resource or call a method.
Traceback (most recent call last):
  File "/home/my-proj/app/script1.py", line 69, in <module>
    main()
  File "/home/my-proj/app/script1.py", line 43, in main
    shared_set_resource = SharedSet(ga.credentials, client_info).create()
  File "/home/my-proj/app/lib/ads.py", line 136, in create
    shared_set_response = shared_set_service.mutate_shared_sets(
  File "/home/my-proj/venv/lib/python3.9/site-packages/google/ads/googleads/v17/services/services/shared_set_service/client.py", line 513, in mutate_shared_sets
    response = rpc(
  File "/home/my-proj/venv/lib/python3.9/site-packages/google/api_core/gapic_v1/method.py", line 131, in __call__
    return wrapped_func(*args, **kwargs)
  File "/home/my-proj/venv/lib/python3.9/site-packages/google/api_core/grpc_helpers.py", line 76, in error_remapped_callable
    return callable_(*args, **kwargs)
  File "/home/my-proj/venv/lib/python3.9/site-packages/grpc/_interceptor.py", line 277, in __call__
    response, ignored_call = self._with_call(
  File "/home/my-proj/venv/lib/python3.9/site-packages/grpc/_interceptor.py", line 332, in _with_call
    return call.result(), call
  File "/home/my-proj/venv/lib/python3.9/site-packages/grpc/_interceptor.py", line 171, in result
    raise self._exception
  File "/home/my-proj/venv/lib/python3.9/site-packages/grpc/_interceptor.py", line 315, in continuation
    response, call = self._thunk(new_method).with_call(
  File "/home/my-proj/venv/lib/python3.9/site-packages/grpc/_interceptor.py", line 343, in with_call
    return self._with_call(
  File "/home/my-proj/venv/lib/python3.9/site-packages/grpc/_interceptor.py", line 332, in _with_call
    return call.result(), call
  File "/home/my-proj/venv/lib/python3.9/site-packages/grpc/_interceptor.py", line 171, in result
    raise self._exception
  File "/home/my-proj/venv/lib/python3.9/site-packages/grpc/_interceptor.py", line 315, in continuation
    response, call = self._thunk(new_method).with_call(
  File "/home/my-proj/venv/lib/python3.9/site-packages/grpc/_interceptor.py", line 343, in with_call
    return self._with_call(
  File "/home/my-proj/venv/lib/python3.9/site-packages/grpc/_interceptor.py", line 329, in _with_call
    call = self._interceptor.intercept_unary_unary(
  File "/home/my-proj/venv/lib/python3.9/site-packages/google/ads/googleads/interceptors/exception_interceptor.py", line 99, in intercept_unary_unary
    self._handle_grpc_failure(response)
  File "/home/my-proj/venv/lib/python3.9/site-packages/google/ads/googleads/interceptors/exception_interceptor.py", line 71, in _handle_grpc_failure
    raise self._get_error_from_response(response)
google.ads.googleads.errors.GoogleAdsException: (<_InactiveRpcError of RPC that terminated with:
        status = StatusCode.PERMISSION_DENIED
        details = "The caller does not have permission"
        debug_error_string = "UNKNOWN:Error received from peer ipv4:142.250.184.202:443 {grpc_message:"The caller does not have permission", grpc_status:7, created_time:"2024-09-18T13:28:17.137407108+00:00"}"
>, <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.PERMISSION_DENIED
        details = "The caller does not have permission"
        debug_error_string = "UNKNOWN:Error received from peer ipv4:142.250.184.202:443 {grpc_message:"The caller does not have permission", grpc_status:7, created_time:"2024-09-18T13:28:17.137407108+00:00"}"
>, errors {
  error_code {
    authorization_error: ACTION_NOT_PERMITTED
  }
  message: "The user does not have permission to perform this action on the resource or call a method."
}
request_id: "hv-aC6rpg9rx-vW3YSZyHQ"
, 'hv-aC6rpg9rx-vW3YSZyHQ')

Thanks in advance !
Ionut

Google Ads API Forum Advisor

unread,
Sep 18, 2024, 10:53:43 AM9/18/24
to ionut...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads API support team.

I understand that you've encountered the ACTION_NOT_PERMITTED error when trying to create a shared set using the Google Ads API. This error occurs when the user does not have permission to perform this action (e.g., ADD, UPDATE, REMOVE) on the resource or call a method. Please make sure the authenticated user has the Admin or Standard access and there is a valid link between the authenticated account and the client customer account. It may be possible that you're using the credentials with read-only access to create a shared set. You will need to have either a standard or administrative access level to make changes to the advertiser's account. You can refer to the steps shown under the "How to edit access level" section of this guide to edit the access level.

Also, could you provide us with the email address you are using to generate the OAuth credentials? Note that you haven’t shared the complete API logs as it doesn’t contain the customer ID and request body. In order to investigate your issue further, kindly provide us with the complete API logs (request and response logs with request-id and request header) generated at your end to better assist you further. 

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides in Python to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 

This message is in relation to case "ref:!00D1U01174p.!5004Q02vGJYO:ref" (ADR-00268604)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages