Skip to content

intercom.errors.ResourceNotFound: scroll parameter not found #201

@oscar-lukersmith

Description

@oscar-lukersmith

a = 0
insert = ''

for user in intercom.users.scroll():
  amp_id = non_type(user.id)
  user_id = non_type(user.user_id)

  if len(insert) == 0:
    insert = "('" + amp_id + "','" + user_id + "')"
  else:
    insert = insert + ",('" + amp_id + "','" + user_id + "')"
  a += 1 

  if a % 10000 == 0:
    lets_insert = insert_query.format(insert)
    cursor.execute(lets_insert)
    con.commit()
    insert = ''
   

It seems to reach different lengths in the scroll (130k records and then 240k records) and then errors out saying intercom.errors.ResourceNotFound: scroll parameter not found. I understand i probably need to pass the scroll parameter from the previous scroll but I cant figure out how to do it. Any help would be greatly appreciated - also apologies if I have missed anything in the docs I can't find anything about scroll.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions