Instagram API
  1. relationships
Instagram API
  • geographies
    • Get recent media from a custom geo-id.
      GET
  • locations
    • Search for a location by geographic coordinate.
      GET
    • Get information about a location.
      GET
    • Get a list of recent media objects from a given location.
      GET
  • media
    • Get a list of currently popular media.
      GET
    • Search for media in a given area.
      GET
    • Get information about a media object.
      GET
    • Get information about a media object.
      GET
  • comments
    • Get a list of recent comments on a media object.
      GET
    • Create a comment on a media object.
      POST
    • Remove a comment.
      DELETE
  • likes
    • Remove a like on this media by the current user.
      DELETE
    • Get a list of users who have liked this media.
      GET
    • Set a like on this media by the current user.
      POST
  • tags
    • Search for tags by name.
      GET
    • Get information about a tag object.
      GET
    • Get a list of recently tagged media.
      GET
  • users
    • Search for a user by name.
      GET
    • See the authenticated user's feed.
      GET
    • See the list of media liked by the authenticated user.
      GET
    • Get basic information about a user.
      GET
    • Get the most recent media published by a user.
      GET
  • relationships
    • List the users who have requested this user's permission to follow.
      GET
    • Get the list of users this user is followed by.
      GET
    • Get the list of users this user follows.
      GET
    • Get information about a relationship to another user.
      GET
    • Modify the relationship between the current user and the target user.
      POST
  1. relationships

Get information about a relationship to another user.

GET
/users/{user-id}/relationship
relationships
Get information about a relationship to another user.
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.instagram.com/users//relationship'
响应示例响应示例
{
    "data": {
        "incoming_status": "none",
        "outgoing_status": "none",
        "target_user_is_private": true
    },
    "meta": {
        "code": 0
    }
}

请求参数

Path 参数
user-id
string 
必需
The ID of a user to get information about.

返回响应

🟢200成功
application/json
Relationship information.
Body
data
object (RelationshipInfo) 
可选
incoming_status
enum<string> 
可选
Status of incoming relationship
枚举值:
nonefollowed_byrequested_by
outgoing_status
enum<string> 
可选
Status of outgoing relationship
枚举值:
nonefollowsrequested
target_user_is_private
boolean 
可选
Indicates whether target user is private or not
meta
object (MetaData) 
可选
code
integer <int32>
可选
HTTP result code

【Instagram】API开发者 微信交流群

用微信扫右侧二维码,加入【Instagram】API开发者 交流群,互助沟通

扫码加入交流群
修改于 2025-04-24 01:41:10
上一页
Get the list of users this user follows.
下一页
Modify the relationship between the current user and the target user.
Built with