Nerixyz / instagram_mqtt

Realtime and Push Notification (FBNS) support for the instagram-private-api
MIT License
252 stars 51 forks source link

subscription parameters in java #54

Open milady4r opened 3 years ago

milady4r commented 3 years ago

I implemented this api in the Java project

In the graphql.subscription And skywalker.subscriptio

**I have a problem and I do not receive any notifications from these parts.

I wanted the parameters sent in this section. Thanks**

Nerixyz commented 3 years ago

Do you have any packet logs or similar? I can't work with "It doesn't work".

milady4r commented 3 years ago

I receive packages from the following topics

 /t_region_hint

ASH   
 / pubsub

Event event "event": "patch", "data": [{"op": "add", "path": "/ direct_v2 / threads / 340282366841710300949128325541865311953 / activity_indicator_id / 6737229195969047596", "value": " {\ "timestamp \": 1606280612173660, \ "sender_id \": \ "4824041774 \", \ "ttl \": 12000, \ "activity_status \": 1} "," doublePublish ": true}]," lazy " : false, "publish_metadata": {"topic_publish_id": - 464472131099755812, "publish_time_ms": "2020-11-24 21: 03: 32.176284"}}}
 / pubsub

Tim {"timestamp": "1606281109", "payload": {"videoCallId": 181731622242050833, "messageType": "RING", "sessionName": "IGVIDEOCALL: 181212662050833", "endpoint": {"appBuildNumber ":" "" appVersion ":" "," appId ":" "," deviceId ":" "," userId ":" 2894270461 "}," body ": {" ringRequest ": {" mediaPath ": 1 , "appMessages": [{"body": {"genericMessage": {"data": "1606281109490", "topic": "start_ts"}}, "header": {"shouldSendToAllUsers": true, "topic_DEPRECATED": ""}}, {"body": {"genericMessage": {"data": "340282366841710300949128325541865311953", "topic": "threadId"}}, "header": {"shouldSendToAllUsers": true, "topic_DEPC" "}}, {" body ": {" genericMessage ": {" data ":" miladiianz "," topic ":" threadDisplayName "}}," header ": {" shouldSendToAllUsers ": true," topic_DEPRECATED ":" " }}], "isScheduledCall": false, "ringType": 0, "otherParticipants": ["2894270461"], "caller": "4824041774}}," header ": {" receiverUserId ":" 17841403073831783 "," conferenceType ": 9," sequenceNumber ": 3," serverInfoData ":" GANsbGEYHUlHVklERU9DQUxMOjEKNFKSGKSKGLSKKGSLKLZ5eXpXa2t4AA == "," retryCount ": 0," tra nsactionId ":" 1786132049914114114 "," conferenceName ":" IGVIDEOCALL: 18173162662050833 "," type ": 4}}," num_endpoints ": 1}    

I need the submitted parameters for subscription I have to receive direct messages

Nerixyz commented 3 years ago

I receive packages from the following topics

But which packets are you sending?

milady4r commented 3 years ago

This is exactly my problem

I do not know what packets to send with what data to receive direct messages

Nerixyz commented 3 years ago

I do not know what packets to send with what data to receive direct messages

To subscribe to these events on instagram mqtt, you only have to publish the subscription to the topic. Take a look at this.

milady4r commented 3 years ago

Thank you for your response. Where can I get the values ​​of these parameters?

 seq_id,
 snapshot_at_ms,
Nerixyz commented 3 years ago

Where can I get the values of these parameters?

Both parameters are from the direct inbox feed response

milady4r commented 3 years ago

Thank You.

The next problem is receiving notifications (likes and comments).

I go through these steps to receive push notifications.

1.

/fbns_reg_req
{"pkg_name":"com.instagram.android","token":"{"k":"eyJwbiI6ImNvbS5pbnN0YWdyYW0u...","v":0,"t":"fbns-b64"}","error":""}

2.

    localjsonobject.put("device_type","android_mqtt")
    localjsonobject.put("is_main_push_channel","True")
    localjsonobject.put("device_sub_type","2")
    localjsonobject.put("phone_id",s_uuid)
    localjsonobject.put("device_token",token)
    localjsonobject.put("guid",s_uuid)
    localjsonobject.put("_csrftoken","")
    localjsonobject.put("_uuid",s_uuid)
    localjsonobject.put("users",userId)

    Post datas to push/register/

But I do not receive notifications

neolinks commented 3 years ago

I do not know what packets to send with what data to receive direct messages

To subscribe to these events on instagram mqtt, you only have to publish the subscription to the topic. Take a look at this.

can you help i sent "Subscribing to /pubsub topics ig/live_notification_subscribe/4731154102, ig/u/v1/4731154102" "Subscribing to /ig_realtime_sub topics 1/graphqlsubscriptions/17913953740109069/{"input_data":{"client_subscription_id":"7085217f-b663-4784-ac5b-74632f84a5ec","device_id":"8ca1201e-c663-4507-9d6b-729869196b50"}}, 1/graphqlsubscriptions/17867973967082385/{"input_data":{"user_id":"4731154102"}}, 1/graphqlsubscriptions/17846944882223835/{"input_data":{"client_subscription_id":"b9fab384-4663-43bd-89aa-139f033ee76f"}}"

but got only Event event "event": "patch", "data": [{"op": "add", "path": "/ direct_v2 / threads / 340282366841710300949128325541865311953 / activity_indicator_id / 6737229195969047596", "value": " {\ "timestamp \": 1606280612173660, \ "sender_id \": \ "4824041774 \", \ "ttl \": 12000, \ "activity_status \": 1} "," doublePublish ": true}]," lazy " : false, "publish_metadata": {"topic_publish_id": - 464472131099755812, "publish_time_ms": "2020-11-24 21: 03: 32.176284"}}}