This is my problem. I had to use https instead of http. but this post was really useful and helped me. Thank you.