• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

Trouble getting API to work...

j0rd

Chevereto Member
Hello, I'm trying to set up and use the API with my site, and I'm not sure I'm configuring it correctly. It's a fresh install, and everything regarding uploading and hosting works as it should, but I am having an issue with the API.

I want to use Lautaro's great vBulletin Import External Images mod. Installed as default, it works fine with rcUPLOAD, but I'm getting the following error when I try to use my own API. The issue isn't with the mod however, as I can't get the API to work on it's own. The link should be http://www.losias.net/imagehost/api.php?


Code:
Forbidden
 
 
 
You don't have permission to access /imagehost/api.php on this server.

If I'm reading the documentation correctly, it looks like I shouldn't have to do much more than change the default key in the config.php and set the API mode to public. I'm probably missing something obvious, so please forgive me if so. Can someone work through this with me?

Thanks
 
Well that is pretty weird, the API doesn't trigger a 403 header at all. Can you enable error_reporting in includes/config.php?
 
The error happens only when you want to upload imges that are outside your domain.

This image gives 403: http://chevereto.com/content/themes/Peafowl/site-img/logo.png
This image gives 200: http://www.losias.net/imagehost/content/themes/Peafowl/theme-img/logo.png

This could be because the cURL function is limited, perhaps it has been disabled to access to remote URLs at all (which is totally stupid because cURL is maded to do remote request). Since the script doesn't fire the 403 header on any cURL response this is telling me that your hosting is forcing this 403 header when you use curl + invalid outside url.
 
Thanks Rodolfo. That gives me someplace to start troubleshooting. I'll followup when I have more info.
 
Back
Top