This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Users in Instagram
[ Overview ] [ Operation details ] [ Sample configuration ]
Overview
The following operations allow you to work with users in Instagram.Click an operation name to see details on how to use it. For sample proxy service which illustrates how to deal with users,see Sample configuration .
Operation | Description |
|---|---|
Retrieves basic information about a user. | |
Retrieves the most recent media published by a user. | |
Retrieves the authenticated user's list of media they have liked. | |
Search for a user by name. |
Operation in details
This section provides further details on the operations related to Users.
Retrieving User Information
The getUserInfo operation is used to retrieve information about a authenticated user.
getUserInfo
<instagram.getUserInfo>
<user_id>{$ctx:user_id}</user_id>
</instagram.getUserInfo>Properties
user_id : Specifies the userId.
Sample request
Following is a sample request that can be handled by the getUserInfo operation.
Sample Request for getUserInfo
{
"access_token":"1392352686.f59def8.8093ea32008743cb8f4275eb20c5423d",
"user_id":"1574083"
}Related API documentation
http://instagram.com/developer/endpoints/users/#get_users
Retrieving User Media
The getUserMediaRecent operation is used to retrieve the most recent media published by a user . It returns a mix of both image and video types .
getUserMediaRecent
<instagram.getUserMediaRecent>
<user_id>{$ctx:user_id}</user_id>
<count>{$ctx:count}</count>
<max_timestamp>{$ctx:max_timestamp}</max_timestamp>
<min_timestamp>{$ctx:min_timestamp}</min_timestamp>
</instagram.getUserMediaRecent>Properties
user_id : The users id
count : Optional. If specified it will return the media according to that specified count .
max_timestamp : Optional. If specified it will return media before this UNIX timestamp .
min_timestamp : Optional. If specified it will return media after this UNIX timestamp .
Sample request
Following is a sample request that can be handled by the
getUserMediaRecent
operation.
Sample Request for getUserMediaRecent
{
"access_token":"1392352686.f59def8.8093ea32008743cb8f4275eb20c5423d",
"user_id":"3",
"count":"10",
"min_timestamp":"946684800",
"max_timestamp":"2147515932"
}Related API documentation
http://instagram.com/developer/endpoints/users/#get_users_media_recent
Retrieving User Likes
The getSelfMediaLiked operation is used to retrieve the authenticated user's list of media they've liked. It returns a mix of both image and video types. This list is ordered by the order in which the user liked the media. Private media is returned as long as the authenticated user has permission to view that media. Liked media lists are only available for the currently authenticated user.
getSelfMediaLiked
<instagram.getSelfMediaLiked>
<count>{$ctx:count}</count>
<max_like_id>{$ctx:max_like_id}</max_like_id>
</instagram.getSelfMediaLiked>Properties
count : Optional. If specified it will return the media according to the count variable.
max_like_id : Optional. If specified it will return media liked before this id.
Sample request
Following is a sample request that can be handled by the getSelfMediaLiked operation.
Sample Request for getSelfMediaLiked
{
"access_token":"1392352686.f59def8.8093ea32008743cb8f4275eb20c5423d",
"count":"10",
"max_like_id":"1"
}Related API documentation
http://instagram.com/developer/endpoints/users/#get_users_feed_liked
Retrieving User Search
The userSearch operation is used to retrieve user details by name that matches a specified query. This method will return the users matches with that specific query.
userSearch
<instagram.userSearch>
<count>{$ctx:count}</count>
<q>{$ctx:q}</q>
</instagram.userSearch>Properties
count : If specified it will return the matching users according to that count.
q : Specifies the query string for instagram.userSearch.
Sample request
Following is a sample request that can be handled by the userSearch operation.
Sample Request for userSearch
{
"access_token":"1392352686.f59def8.8093ea32008743cb8f4275eb20c5423d",
"count":"10",
"query_name":"jack"
}Related API documentation
http://instagram.com/developer/endpoints/users/#get_users_search