Jump to content

Featured Replies

Делаю авторизацию в панели через свой форум. Дошел до момента, где получаю 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
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.


Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.