You're not hitting an endpoint in the api. Your hitting the base url of the api.
$url = "https://user:[email protected]/v1/tournaments.json";
See the docs: https://api.challonge.com/v1/
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hello, I am trying to use the guzzle package to post to challonge API using the following code but Laravel is returning the following error any help is greatly appreciated.
Client error: `POST https://username:***@api.challonge.com/v1/` resulted in a `404 Not Found
controller
public function index()
{
$client = new \GuzzleHttp\Client();
$url = "https://user:[email protected]/v1/";
$params = array(
"tournament[name]" => "My Tourney",
"tournament[tournament_type]" => "single elimination",
"tournament[url]" => "my_toruney",
"tournament[description]" => "Challonge is <strong>AWESOME</strong>"
);
$request = $client->post($url, ['tournaments'=>$params]);
$response = $request->send();
}
web.php
Route::resource('test', 'TeamController');
Yes, look at the url I wrote in my first post.
$url = "https://UserName:[email protected]/v1/tournaments.json";
When the docs show {json|xml} here
POST https://api.challonge.com/v1/tournaments.{json|xml}
it means it should be .json OR .xml, not the whole thing literally
Please or to participate in this conversation.