Retrieving users
Feature available for: LinkedIn, WhatsApp, Instagram, Telegram.
Get an Attendee
Once you have chats and messages, you might want to match them with Users. Use the GET /chat_attendees/{id} or GET /chat_attendees API methods, or the matching SDK methods.
Get a User with a public identifier
You can retrieve a user profile, including its provider internal id, by providing the provider public id using the GET /users/{provider_public_id} API method or the matching SDK method.
This can be useful to start new chats with unknown users.
If the user is unknown, this method does not sync the user into postpress. It is just a proxy to the provider. This means the user will not appear in attendees lists unless you start a new chat with them.
Get a public identifier from an Attendee
For now, public identifiers are not present in Attendees. You can use the GET /users/{provider_id} method or the matching SDK method to find one by passing the provider internal id found in Attendees and Messages.
Be careful how you implement GET /users/{provider_id | provider_public_id}. Please have a look at the provider limits and restrictions page.
Example of retrieving a full LinkedIn profile
Using the Retrieve a profile route
You need to have already connected your LinkedIn account to proceed with this request. Make sure to use the account_id in each request.
If you want to retrieve this profile: https://www.linkedin.com/in/satyanadella/, use only the last part of the URL, satyanadella, as the identifier. You can also use a provider_id as the identifier, for example ACoAAAEkwwAB9KEc2TrQgOLEQ-vzRyZeCDyc6DQ.
We use the parameter linkedin_sections=* to retrieve all data of the profile (experience, skills, about, and so on).
curl --request GET \
--url 'https://api.postpress.ai/v1/users/satyanadella?linkedin_sections=%2A&account_id=3H-KVe-mQ2GT9M0hKSkgHgs' \
--header 'X-API-KEY: ${POSTPRESS_API_KEY}' \
--header 'accept: application/json'Result
{
"object": "UserProfile",
"provider": "LINKEDIN",
"provider_id": "ACoAAAEkwwAB9KEc2TrQgOLEQ-vzRyZeCDyc6DQ",
"public_identifier": "satyanadella",
"member_urn": "19186432",
"first_name": "Satya",
"last_name": "Nadella",
"headline": "Chairman and CEO at Microsoft",
"primary_locale": { "country": "US", "language": "en" },
"is_open_profile": true,
"is_premium": true,
"is_influencer": true,
"is_creator": true,
"is_relationship": false,
"network_distance": "THIRD_DEGREE",
"is_self": false,
"websites": ["https://snscratchpad.com/"],
"follower_count": 11888916,
"connections_count": 831,
"location": "Redmond, Washington, United States",
"profile_picture_url": "https://media.licdn.com/.../profile-displayphoto-shrink_100_100.jpg",
"profile_picture_url_large": "https://media.licdn.com/.../profile-displayphoto-shrink_800_800.jpg",
"background_picture_url": "https://media.licdn.com/.../profile-displaybackgroundimage-shrink_200_800.jpg",
"education_total_count": 3,
"education": [
{
"school_id": "8398",
"school": "The University of Chicago Booth School of Business",
"start": "1/1/1994",
"end": "1/1/1996"
},
{
"degree": "Bachelor's Degree, Electrical Engineering",
"school_id": "577550",
"school": "Manipal Institute of Technology",
"start": null,
"end": null
},
{
"degree": "Master's Degree, Computer Science",
"school_id": "166690",
"school": "University of Wisconsin-Milwaukee",
"start": null,
"end": null
}
],
"work_experience_total_count": 5,
"work_experience": [
{
"company_id": "1035",
"company": "Microsoft",
"position": "Chairman and CEO",
"location": "Greater Seattle Area",
"start": "2/1/2014",
"end": null
},
{
"company_id": "3881",
"company": "University of Chicago",
"position": "Member Board Of Trustees",
"start": "1/1/2018",
"end": null
},
{
"company_id": "2271",
"company": "Starbucks",
"position": "Board Member",
"start": "1/1/2017",
"end": "1/1/2024"
}
],
"skills_total_count": 0,
"skills": [],
"languages_total_count": 0,
"languages": [],
"certifications_total_count": 0,
"certifications": [],
"summary": "As chairman and CEO of Microsoft, I define my mission and that of my company as empowering every person and every organization on the planet to achieve more.",
"volunteering_experience_total_count": 0,
"volunteering_experience": [],
"projects_total_count": 0,
"projects": [],
"recommendations": {
"given_total_count": 1,
"given": [
{
"caption": "May 3, 2010, Satya managed Ken directly",
"text": "Ken is one of the solid engineering managers I have worked with...",
"actor": {
"first_name": "Ken",
"last_name": "Moss",
"provider_id": "ACoAAACv_-sB5Ql4SvCZjwLgDeGUZjlW_V0nnKU",
"public_identifier": "iamkenmoss",
"headline": "Bringing the magic of software and AI to help as many people around the world as possible",
"public_profile_url": "https://www.linkedin.com/in/iamkenmoss"
}
}
],
"received_total_count": 0,
"received": []
},
"hashtags": []
}