Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)
I want to take the access of the users from Intercom Python API using the tag last viewed less than 2 days ago or else producing the section in UI for the same. How to do that?

1 Answer

0 votes
by (107k points)

Please be informed that you can achieve your output, by either tag or segment - while setting those two up may be quite different and that's a different conversation - querying by either of them is quite similar.

You can obtain the selected users/leads by asking the user's resource with a segment_id parameter, showing the id of the segment to query with.

To fetch marked users/leads, you can apply a tag_id parameter to symbolize that the id of the tag. For data on tagging users see the section 'Tag or Untag Users'.

If you're working with python-intercom, then your command may look like this: 

intercom.users.find(tag_id=3142) OR intercom.users.find(segment_id=5926)

Interested in learning Python? Enroll in our Python Course

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...