国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

如何使用 php-upwork-oauth2 獲取 upwork 客戶端
P粉627027031
P粉627027031 2024-03-30 00:41:19
0
1
667

我正在使用 php-upwork-oauth2 包和 symfony 來獲取我的 upwork 配置文件信息。

基于此存儲庫:https://github.com/upwork/php-upwork-oauth2/blob/master/example/example.php 我添加了我的 clientId 和 clientSecret:

$config = new \Upwork\API\Config([
        'clientId'          => '...', // SETUP YOUR CONSUMER KEY
        'clientSecret'      => '...', // SETUP KEY SECRET
        'redirectUri'       => 'https://localhost:8000/upwork',
        'accessToken'       => $session->get('access_token'),
        'accessSecret'      => $session->get('access_secret'),
        //'expiresIn'         => 'xxxxxxxxxx', // WARNING: keep this up-to-date!
        'debug'             => true, // enables debug mode
        //'authType'          => 'MyOAuthPHPLib' // your own authentication type, see AuthTypes directory
    ]);

    $client = new \Upwork\API\Client($config);

    $auth = new \Upwork\API\Routers\Auth($client);

    $info = $auth->getUserInfo();

    dd($info);

如何獲取 accessToken 和 accessSecret ?

我目前收到此錯誤:

調(diào)用字符串上的成員函數(shù) getBody()

P粉627027031
P粉627027031

全部回復(fù)(1)
P粉696605833

代碼中的 $session->get('access_token'), 是什么?是否設(shè)置了某些內(nèi)容? 我建議:

  1. 注釋掉 accessTokenaccessSecret
  2. 遵循身份驗證和授權(quán)流程
  3. grep 收到訪問令牌/秘密
  4. 將令牌對添加到配置中
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板