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 = "https://graph.facebook.com/v11.0/oauth/access_token?"

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

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

USER_ID = "INSTAGRAM_ID"
ACCESS_TOKEN = "LONG-LIVED TOKEN"

def postInstagramQuote():
# Post the Image
    image_location_1 = 'https://i.redd.it/kx4kotszdvm71.jpg'
    post_url = f'https://graph.facebook.com/{USER_ID}/media'
    payload = {
        'image_url': image_location_1,
        'caption': 'New Look!!!',
        "access_token": ACCESS_TOKEN,

        }

    r = requests.post(post_url, params=payload)
    print(r.text)
    result = json.loads(r.text)
    print(result)

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