Forums

Problem to make a https request to flipkart api.

Hi, I am having trouble to call flipkart api from my app at pythonaywhere.com. It shows the following error. requests.exceptions.ConnectionError: HTTPSConnectionPool(host='affiliate-api.flipkart.net', port=443): Max retries exceeded with url: /affiliate/offers/v1/dotd/json (Caused by ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 403 Forbidden',)))
when trying to call flipkart api at https://affiliate-api.flipkart.net/ . Please help me to solve this.I think the problem may be because of affiliate-api.flipkart.net is not in the whitelist. I am using a free account.So if there is any chance for me to have access to that site?

Yup, that's a whitelist problem. I've whitelisted the site and it should work now.

Thanks for your help.

Hi

I have one more url to add 'http://tinyurl.com/api-create.php?' .This url is also raising an error 403. raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 403: Forbidden

So please add tinyurl.com to the whitelist.

Sure, that's done.

Thank you

No problem!

Hi Team, i am facing project i setup the yowsup app in pythonanywhere i am getting below error please

Traceback (most recent call last): File "yowsup-cli", line 368, in <module> if not parser.process(): File "yowsup-cli", line 272, in process self.startSendClient() File "yowsup-cli", line 324, in startSendClient stack.start() File "/home/bvenkata/.virtualenvs/myproject/lib/python3.5/site-packages/yowsup/demos/sendclient/stack.py", line 31, in start self.stack.loop() File "/home/bvenkata/.virtualenvs/myproject/lib/python3.5/site-packages/yowsup/stacks/yowstack.py", line 196, in loop asyncore.loop(args, *kwargs) File "/usr/lib/python3.5/asyncore.py", line 203, in loop poll_fun(timeout, map) File "/usr/lib/python3.5/asyncore.py", line 150, in poll read(obj) File "/usr/lib/python3.5/asyncore.py", line 87, in read obj.handle_error() File "/usr/lib/python3.5/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/lib/python3.5/asyncore.py", line 423, in handle_read_event self.handle_read() File "/home/bvenkata/.virtualenvs/myproject/lib/python3.5/site-packages/yowsup/layers/network/layer.py", line 98, in handle_read data = self.proxyHandler.recv(self, readSize) File "/home/bvenkata/.virtualenvs/myproject/lib/python3.5/site-packages/yowsup/common/http/httpproxy.py", line 91, in recv raise Exception('%s' % (data[:data.index('\r\n')])) Exception: HTTP/1.1 403 Forbidden

If you are a free user, you are only allowed to access an existing whitelist. If you are trying to access a public api, you can show us the api docs and endpoints and we can add it to the whitelist for you. Otherwise you will have to upgrade. See here for more details.