Gulherme De Napoli

Gulherme De Napoli

I'm unable to access Vimeo's API and oEmbed endpoint (or any of Vimeo's pages, for that matter) using Python's urllib and urllib2 libraries. I just keep getting a 403 Forbidden error. This has happened from any location I've tried, which leads me to think the ban is comprehensive to some extent (probably blocking any access from urllib).

Can anyone shed some light on this issue? Thanks!

Brad Dougherty

Brad Dougherty Staff

If you change the user agent that it's reporting, it should work.

Gulherme De Napoli

Gulherme De Napoli

Thanks Brad! Works perfectly.

Now, would you mind if I ask you, just by curiosity, why this is actually necessary? I mean, it is expected that people query your API through Python. Does this measure effectively protect your servers from abuse in some way? (By the way, this block wasn't up a few days ago.)

Thanks again for your time!

John Stephen

John Stephen

I got a python api library working a couple of months ago. Just recently I came back to it and found I was getting 403 on every connection. It seems for some reason they introduced a ban on urllib recently. In order for it to work, you just have to send a user agent header with your request. It's documented on the api homepage, but they don't say why. I too would like to know, just out of curiosity really :)

Brad Dougherty

Brad Dougherty Staff

It's generally to prevent abuse of the API. I'm not sure why it wasn't being blocked before, that's been in the documentation for awhile.

This conversation is missing your voice. Please join Vimeo or log in.