Publishing Post using Instagram API - Unable to obtain container ID

I'm trying to post an image to Instagram using the content publishing API

I've used the short-lived token and exchanged it for the long-lived token using:

import requests

url = ""

params = {
     "grant_type": "fb_exchange_token",
    "client_secret": "SECRET",
    "fb_exchange_token":"SHORT-LIVED TOKEN",
r = requests.get(url, params=params)

Then, I passed this onto another script that would create the container. It's supposed to return the container ID so that I can then publish the image to Instagram.

Instead, I get the below error:

{'error': {'message': '(#12) singular statuses API is deprecated for versions v2.4 and higher', 'type': 'OAuthException', 'code': 12, 'fbtrace_id': 'AGn5FGq1hfhtpDVsAfraIGe'}}

Here is the code I used to try & obtain the container ID:

import requests
import json


def postInstagramQuote():
# Post the Image
    image_location_1 = ''
    post_url = f'{USER_ID}/media'
    payload = {
        'image_url': image_location_1,
        'caption': 'New Look!!!',
        "access_token": ACCESS_TOKEN,


    r =, params=payload)
    result = json.loads(r.text)

What does the error mean? Where am I going wrong?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum