From 28c344c6456cc38d82582fb8c0d71fe282d29a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 25 Jun 2021 15:56:23 +0200 Subject: [PATCH] Endpoint for session token has changed in late 2020 --- src/DiscourseAPI.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DiscourseAPI.php b/src/DiscourseAPI.php index 3de972b..85acf59 100644 --- a/src/DiscourseAPI.php +++ b/src/DiscourseAPI.php @@ -541,7 +541,7 @@ public function createUser( ) { // we need to call hp.json to get a challenge string - $challengeStringObject = $this->_getRequest( '/users/hp.json' ); + $challengeStringObject = $this->_getRequest( '/session/hp.json' ); if ( $challengeStringObject->http_code !== 200 ) { return false; } @@ -1305,4 +1305,4 @@ public function getTopTopics( string $period = 'yearly', string $userName = 'sys return $res; } -} \ No newline at end of file +}