1

使用数字 api 调用 oauth 验证但从 SDK 得到错误响应。

在我的 curl 脚本中的代码下方。

$curl = curl_init();
curl_setopt($curl,CURLOPT_URL, $xAuthServiceProvider);
curl_setopt($curl,CURLOPT_HTTPHEADER, array(
    'Content-length: 0',
    'Content-type: application/json',
    'Authorization: '.$xVerifyCredentialsAuthorization,
));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$content = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
$obj = json_decode($content, true);


像这样的回应

{"url":"https:\/\/api.digits.com\/1.1\/sdk\/account.json","content_type":null,"http_code":0,"header_size":0,"request_size":0,"filetime":-1,"ssl_verify_result":1,"redirect_count":0,"total_time":0.375,"namelookup_time":0.016,"connect_time":0.234,"pretransfer_time":0,"size_upload":0,"size_download":0,"speed_download":0,"speed_upload":0,"download_content_length":-1,"upload_content_length":-1,"starttransfer_time":0,"redirect_time":0,"redirect_url":"","primary_ip":"192.44.68.8","certinfo":[],"primary_port":443,"local_ip":"10.0.1.28","local_port":55193}

-$xAuthServiceProvider是“ https://api.digits.com/1.1/sdk/account.json

-$xVerifyCredentialsAuthorization是由数字 api 返回的身份验证响应。

请帮助我,SDK 在 iOS 和 Android 应用程序中运行良好,但服务器端无法运行。

4

0 回答 0