This is my current code to get the conversations for my IG profile:
import requests
id = '<id>'
# URL and endpoint
url = f"https://graph.facebook.com/v19.0/{id}/conversations/"
# Parameters
params = {
"platform": "instagram",
"access_token": '<access_token>'
}
# Make the GET request
response = requests.get(url, params=params)
# Check the response status code (200 is OK)
print(f"Status Code: {response.status_code}")
# Print the response text to see the content
print(response.json())
To which I'm getting the output:
Status Code: 200
{'data': []}
Steps taken for this after research:
- Enabled Connected Tools > Enable Access To Messages (on IG) following this
- Created and connected a facebook page for the account
- Turned the account into a business account
- Published the app live
- Created another instagram account, under the same admin (with a page and turned to business) account on facebook and messaged both with each other
- Waited 30 days
- Allowed ALL permissions upon access token creation of account
Please help