Posted 21 сентябряSep 21 comment_211309 Делаю авторизацию в панели через свой форум. Дошел до момента, где получаю access_token, однако, когда пытаюсь выполнить запрос, используя полученный access_token, форум возвращает мне ошибку NO_API_KEY. Код: $accessToken = $_SESSION['data']['access_token']; echo $accessToken; echo '<br>'; $communityUrl = 'https://МОЙ_САЙТ.ru/'; $endpoint = '/?core/hello'; $curl = curl_init( $communityUrl . 'api' . $endpoint ); curl_setopt_array( $curl, array( CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_USERAGENT => "MyUserAgent/1.0", CURLOPT_HTTPHEADER => array( "Authorization: Bearer {$accessToken}" ), )); $response = curl_exec( $curl ); Link to comment https://ipbmafia.ru/topic/28001-problema-s-oauth/ Share on other sites Больше вариантов
22 сентябряSep 22 comment_211317 https://invisioncommunity.com/developers/rest-api Link to comment https://ipbmafia.ru/topic/28001-problema-s-oauth/?&do=findComment&comment=211317 Share on other sites Больше вариантов
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.