Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Вопрос по первому получению токенов. #36

Open
Freerade55 opened this issue Dec 1, 2022 · 0 comments
Open

Comments

@Freerade55
Copy link

Freerade55 commented Dec 1, 2022

`require_once 'vendor/autoload.php';

use \Ufee\Amo\Oauthapi;
use \Ufee\Amo\Base\Storage\Oauth\FileStorage;

$amo = Oauthapi::setInstance([
'domain' => 'poddomain.amocrm.ru',
'client_id' => '....',
'client_secret' => '.....',
'redirect_uri' => 'https://site.ru',
'zone' => 'ru',
'timezone' => 'Europe/Moscow',
'lang' => 'ru'
]);

//
$amo = Oauthapi::getInstance('......');

$first_auth_url = $amo->getOauthUrl($arg = ['mode' => 'popup', 'state' => 'amoapi']);
;

$code = '.......';
$oauth = $amo->fetchAccessToken($code);
print_r($oauth);`
print_r($oauth) вроде как должен вывести время, когда захешировались токены так? Ничего не приходит, может чего написал не так? Второй вопрос, в папке cache создается папка с названием домена, но в ней ничего нет, как мне посмотреть, что вообще сохранилось в итоге?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant