F
F
FANTASANTA2020-06-09 13:33:48
PHP
FANTASANTA, 2020-06-09 13:33:48

How to get a direct link to Instagram photos and videos?

Previously, I used their /?__a=1 method and got json from their graphql:
https://www.instagram.com/p/B_8MQ67h-mf/?__a=1
If you open this link, you will get json data with direct links to the file. But if you call this link programmatically (CURL or file_get_contents), then the redirect occurs to the authorization page on Instagram. This limitation appeared just a few days ago. I searched on the Internet, it seems that Instagram restricted access to the site when it was programmatically accessed.

Based on this, I have a question - What are the methods now for obtaining direct links to photo / video content?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
�
 , 2020-06-24
@FANTASANTA

Your option will work if you send the header with sessionid cookies. Or you can get a post like this: https://www.instagram.com/graphql/query/?query_has...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question