Menu

A provider 403 vs my own guard-rail 403: telling them apart in the logs
πŸ“°

A provider 403 vs my own guard-rail 403: telling them apart in the logs

DEV Community: phpΒ·Mobeen AhmedΒ·9 days ago
#DeoxNN5s
#devto#dev#provider#guard#rail
Long article (612 words) β€” no AI summary yet.
Reading 0:00
15s threshold

When something breaks on a small site, the first question is always the same: is this my fault, or theirs? On ramrom.io I learned to answer that question properly, because my download flow has two different pieces that can both return a 403 β€” and for a while, I could not tell them apart.

Here is the setup. A visitor pastes a video link into the tool. My PHP endpoint, resolve.php, calls a third-party provider over its API to work out what the video is and where the file lives. Then a second endpoint, the download proxy, fetches that file and streams it back to the visitor. Both steps can fail with a 403. The number is the same, but the meaning is completely different.

A provider 403 means the outside service refused me. Usually the cause is boring: the API key is wrong, the free-tier quota ran out, or the provider changed what it allows on my plan. Sometimes the provider's own upstream β€” the CDN that hosts the video β€” decides my server's IP looks like a bot and blocks it.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.