Instagram-private-api: Clickable links in direct message

Created on 26 Jul 2017  路  9Comments  路  Source: dilame/instagram-private-api

Hi, anyone know how to make links clickable in a direct message? Currently the message will send with just the link as a string and not a hyperlink

enhancement

Most helpful comment

@begly This library has no method for this action now, but you can implement this and send PR.
Endpoint for this is POST https://i.instagram.com/api/v1/direct_v2/threads/broadcast/link/
with such body

Key | Value
-- | --
action | send_item
link_text | Just text instagram.com
_uuid | EF4FBE62-99BB-4EA1-996F-B553DAE3765A
client_context | E04282C1-9DAD-4C64-9F50-E8A41F95630C
thread_id | 340282366841710300949128141257424359243
link_urls | ["http://instagram.com"]
_csrftoken | jaAQ9IAay3515b22FtZoUBM1GFCJtyOX

All 9 comments

@begly This library has no method for this action now, but you can implement this and send PR.
Endpoint for this is POST https://i.instagram.com/api/v1/direct_v2/threads/broadcast/link/
with such body

Key | Value
-- | --
action | send_item
link_text | Just text instagram.com
_uuid | EF4FBE62-99BB-4EA1-996F-B553DAE3765A
client_context | E04282C1-9DAD-4C64-9F50-E8A41F95630C
thread_id | 340282366841710300949128141257424359243
link_urls | ["http://instagram.com"]
_csrftoken | jaAQ9IAay3515b22FtZoUBM1GFCJtyOX

@begly
Hi, how is it going this issue?
just i'm curious

@begly
And what further to do with the answer?
I receive {"action": "item_ack", "status_code": "200", "payload": {"client_context": "28C18C79-6F4A-4100-9E77-051DD9F99ECB", "item_id": "27712010498203388609205971688882176", "timestamp" : "1502271099304661", "thread_id": "38642339875287804975648647953286947520"}, "status": "ok"}

@GoldenEagle66 are you sure your question was for begly ?

@begly
Well, you suggested how to get the link, perhaps you know the further actions. In the sniffer I see only the receipt of the link, I do not see the sending

@GoldenEagle66 Yes, i have not noticed one next request, but i'm not sure this can help.
POST https://i.instagram.com/api/v1/notifications/badge/

Key | Value
-- | --
_csrftoken | jaAQ9IAay3515b22FtZoUBM1GFCJtyOX
_uuid | EF4FBE62-99BB-4EA1-996F-B553DAE3765A
user_ids | 5436575792,300687565
device_id | EF4FBE62-99BB-4EA1-996F-B553DAE3765A

@begly
I send the request to receive the link and in return receive what I sent above. Then I send your second request and in return I get {"badge_payload": {}, "status": "ok"}, but there is no link in the correspondence, version api 10.26 .0

@dilame is it correct below? but i got Unhandled rejection ParseError: Not possible to parse API response

step 1.
var payload = { action: 'send_item',
  link_text: 'go to http://www.google.com',
  client_context: 'deb5e5a1-08d9-4a5a-8ae4-5682c53b2046',
  thread_id: '340282366841710300949128162629334303906',
  link_urls: [ 'http://www.google.com' ] }
step 2.
var request = new Request(session)
    .setMethod('POST')
    .generateUUID()
    .setResource('threadsBrodcastLink')
    .setData(payload)
    .send();

i sent pr

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LouenLeoncoeur picture LouenLeoncoeur  路  12Comments

ambross picture ambross  路  10Comments

ciolt picture ciolt  路  35Comments

350d picture 350d  路  53Comments

dhillon2325 picture dhillon2325  路  14Comments