service = discovery.build('dfareporting', 'v3.3', credentials=credentials)
try: # Construct the request. request = service.remarketingLists().list(profileId=profile_id, advertiserId=advertiser_id, floodlightActivityId=floodlightActivityId, name='to') df3 = pd.DataFrame({'id': [], 'name': []}) while True: response = request.execute() for remarketing_list in response['remarketingLists']: df3 = df3.append({'id': remarketing_list['id'], 'name': remarketing_list['name']}, ignore_index=True)
print(response)
if response['remarketingLists'] and response['nextPageToken']: request = service.remarketingLists().list_next(request,response)
else: break
except client.AccessTokenRefreshError: print ('The credentials have been revoked or expired, please re-run the ' 'application to re-authorize')
Hi Antony,
Your concern seems to be related to python client libraries as you are not facing any error when getting remarketing list via API. I recommend posting you concern here as the our client libraries team will be the best to assist you regarding this. Feel free to reach out if you have any concerns related to DCM API.
Regards,
Nikisha Patel, DCM API Team