webman windows 环境下请求google接口443

呆呆的阿戴

问题描述

这里写问题描述
环境配置:
1 win11 + Workerman version:4.1.15 + PHP version:8.1.1
2 问题描述;
Google Play用户评分和评价信息的接口 443 请求超时

     $api = 'https://accounts.google.com/o/oauth2/token';

    $params = [
        'client_id'     => $this->config['google_client_id'] ?? '',
        'client_secret' => $this->config['google_client_secret'] ?? '',
        'refresh_token' => $this->config['google_refresh_token'] ?? '',
        'grant_type' => 'refresh_token',
    ];

    $data = curlPost($api,$params);

    这里参数都是正常的,postman接口可以获得结果。
    但是本地接口去请求的时候 就出现443 请求失败
    错误如下:
    "{"errcode":28,"errmsg":"Failed to connect to androidpublisher.googleapis.com port 443: Timed out"}"

VPN代理已开 但是Windows环境去执行请求google的接口就443

187 1 0
1个回答

XueSi

你需要给curl设置代理。具体如何设置请自行谷歌或百度。

  • zhuangeric 3天前

    有具体的解决方案了吗?浏览器开了vpn是能正常访问的,就webman项目不行

×
🔝