URL for adding users via REST api

102 views
Skip to first unread message

Bongani Maswanganyi

unread,
Jan 16, 2024, 8:16:32 AM1/16/24
to Google Ads API and AdWords API Forum
Hi,

I want to create a POST method to add users into my segment. I found this cURL request; curl --request POST \
  --url 'https://googleads.googleapis.com/v10/customers/1234567890/userLists/YOUR_USER_LIST_ID:mutateMembers' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --data-raw '{
    "customerId": "1234567890",
    "operations": [
      {
        "operator": "ADD",
        "operand": {
          "userListId": "YOUR_USER_LIST_ID",
          "membersList": [
            {
              "hashedEmail": "HASHED_EMAIL_1"
            },
            {
              "hashedEmail": "HASHED_EMAIL_2"
            }
            # Add more members as needed
          ]
        }
      }
    ]
  }'

however it didn't work. Please assist, I don't want to use google methods. I just want to hit a URL with specified data.

Google Ads API Forum Advisor

unread,
Jan 16, 2024, 6:20:48 PM1/16/24
to bonga...@gmail.com, adwor...@googlegroups.com
Hi,

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

By reviewing your query, I understand that you would like to hit the data with specific data.

The Google Ads API can be called either using gRPC or REST. Both interfaces expose a resource-oriented design shared with other Google Cloud APIs. I would recommend you to use Google's official client libraries. Also, could you please confirm if you are trying to perform UserListOperation?

Kindly note that the latest version is 'v15'. I would recommend migrating to the latest version v15 and you may follow this link to Upgrade to the latest version.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02rWntk:ref"

Thanks,
 
Google Logo Google Ads API Team


Bongani Maswanganyi

unread,
Jan 17, 2024, 2:35:14 AM1/17/24
to Google Ads API and AdWords API Forum
Hi,

We are doing our data orchestration through Azure Synapse. I am just wondering if I would be able to get an api end point that I can use a Post method to add data into a userList. Is there an endpoint I could use like the example on my initial post?

Also, could you please confirm if you are trying to perform UserListOperation?
Yes, I am trying to perfom UserListOperation. I want to add and remove from UserList(Segments)

Regards,
BM

Google Ads API Forum Advisor

unread,
Jan 17, 2024, 4:34:18 AM1/17/24
to bonga...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

By reviewing your concern, I understand that you need information regarding the mutate UserList(Segments) API end point.

I would recommend you to check this guide on how to create and update userlists for more information.
Reply all
Reply to author
Forward
0 new messages