Invalid format for callback url - Instagram API library and python

I have the following code to get images from urls

    params = {'client_id':settings.SOCIAL_AUTH_INSTAGRAM_KEY,
              'client_secret':settings.SOCIAL_AUTH_INSTAGRAM_SECRET,
              'aspect':'media',
              'object_id':instance.hashtag,
              'callback_url':'http://localhost:8000/campaigns/hook'}
    response = requests.post('https://api.instagram.com/v1/subscriptions/', 
                             params=params)

I am using a request library to send a send request. But it returns an error message

"Invalid format for \" callback_url \ ". URL must", "start with \" http: \ / \ / \ "or \" https: \ / \ / \ ""

I have no idea that I am receiving this message. I am sending a request to the following URL.

https://api.instagram.com/v1/subscriptions/?client_secret=ZZZZZZZ&callback_url=http%3A%2F%2Flocalhost%3A8000%2Fcampaigns%2Fhook&aspect=media&client_id=YYYYYYYYYYY&object_id=asda '

What is the difference btw http%3A%2F%2F and http:\/\/\

Any ideas?

+1
1

data:

response = requests.post('https://api.instagram.com/v1/subscriptions/', 
                         data=params)

params GET.

URL ; http://localhost - URL-, Instagram.

+2

All Articles