aliyun / openapi-sdk-php Goto Github PK
View Code? Open in Web Editor NEWAlibaba Cloud SDK for PHP
Home Page: https://packagist.org/packages/alibabacloud/sdk
License: Other
Alibaba Cloud SDK for PHP
Home Page: https://packagist.org/packages/alibabacloud/sdk
License: Other
您的功能请求是否与问题有关? 请描述一下。
我们是基于Swoole做的项目。在项目中会存在会根据请求去使用不同的accesskey和accesssecret。由于是协程并发。所以会导致static会存在不安全。所以有计划去支持动态client么。还是说只能根据协程ID 去区分不同的clientname 去保证安全
描述你想要的解决方案
请描述所需的行为。
描述您考虑过的替代方案
请描述您考虑的替代解决方案或功能。
use AlibabaCloud\Client\AlibabaCloud;
use AlibabaCloud\Client\Exception\ClientException;
use AlibabaCloud\Client\Exception\ServerException;
这个你告诉我你的openapi-sdk-php-master里 是什么文件?没头没脑的sdk,看得人恼火不已
https://github.com/aliyun/openapi-sdk-php/tree/master/src/Cas
目前SDK有且只有 V20180813
而文档是 V20180713 + V20180813
May not yet support product Green quick access, you can use [Alibaba Cloud Client for PHP] to send any custom requests: https://github.com/aliyun/openapi-sdk-php-client/blob/master/docs/en-US/3-Request.md
安装一个sdk,要下载全部,这不科学。还有你们的支付接口的sdk,也是一样的。
差OSS 的SDK呢
According to vendor/alibabacloud/client/src/Request/Request.php
, a "Server Retry" is calling request()
again, and a "Client Retry" is calling response()
again. But request()
is just resolveOption()
+ response()
. Also, both shouldServerRetry()
and shouldClientRetry()
determines the status code returned from GuzzleHttp. It seems that they behave the same. So which should I use for ensuring the idempotent (https://help.aliyun.com/document_detail/25693.html)?
ListVodTemplate这个接口在新版的aliyun-php-sdk-vod/vod中是ListTranscodeTemplateGroupRequest负责的(我只是从单词意思上分析的),官方文档里也没有ListVodTemplate的介绍,现在都是composer直接安装的,为啥两边不保持一致呢?
I am currently testing Image search from this repo, but unfortunately, I am sending an empty request as per stated by the Support Engineer when doing tickets in the console. I am writing here as it was suggested by the Support engineer to raise an issue here instead.
My question is that, why is the Image search codes are empty compare to the Aliyun open api sdk or the downloadable library
Any way you can update the image search? As I really prefer to use composer when installing libraries.
If you have a question about Alibaba Cloud that is not a bug report or feature
request, please post it in https://selfservice.console.aliyun.com/ticket/createIndex
Questions posted to this repository will be closed.
您好,我想问下,内容安全 SDK ,创建自定义文本库。是否是 getSimilarityLibrary() 方法。我通过此方法返回状态码 200 , 但是云盾控制台似乎没有?还是说,通过接口创建的文本库在控制台看不到?
另外,我通过 getSimilarityLibrary 获取报错。
$body = [
'ServiceModule' => 'open_api'
];
$body = json_encode($body);
return \AlibabaCloud\Green\Green::v20180509()->getSimilarityLibrary()->body($body)->request()->toArray();
tp5.05 项目根目录中
运行: composer require alibabacloud/sdk 安装成功,
结果:thinkphp目录中的 start.php 被无缘无故删除。导致项目不能运行。
测试次数:3次,
测试结果:文件均被删除
我看就两个文件,然后和官方demo完全不一致在,这个怎么用啊?
顺带今天下午官方demo都是 ic error,这个怎么解决?
这是我能想到的参数的, 你们的文档实在是太少.
// Set up a global client
AlibabaCloud::accessKeyClient(config('oss.access_key'), config('oss.secret_key'))
->regionId(config('oss.original_bucket_region')) // oss-cn-beijing or cn-beijing ?
->asDefaultClient();
$response = Vod::v20170321()
->getVideoInfos(['videos/54c097dd-3060-4052-9729-80aceca2ef06.mp4'])
->debug(true)
->request();
// response output
* Connection #0 to host vod.oss-cn-beijing.aliyuncs.com left intact
AlibabaCloud\Client\Exception\ServerException : SDK.UnknownError: <?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AccessDenied</Code>
<Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message>
<RequestId>5F053847B258223133F1711A</RequestId>
<HostId>vod.oss-cn-beijing.aliyuncs.com</HostId>
<Bucket>vod</Bucket>
<Endpoint>oss-cn-shanghai.aliyuncs.com</Endpoint>
</Error>
RequestId: POST "http://vod.oss-cn-beijing.aliyuncs.com" 403
看这个应该是 endpoint 错误了, 但没看到有参数可以设置. 烦请帮忙看一下, 谢谢.
where is KMS sdk in this source ? this is available and how to used it ?
报错 Dm Versions contains no V20151123
版本 1.2.10
$request = AlibabaCloud::dm()->v20151123()->singleSendMail()
//管理控制台中配置的发信地址。
->withAccountName($from_mail)
//发信人昵称,长度小于 15 个字符。 例如:发信人昵称设置为”小红”,发信地址为 “[email protected]”,收信人看到的发信地址为"小红"<[email protected]>
->withFromAlias($from_alias)
//取值范围 0~1: 0 为随机账号;1 为发信地址。
->withAddressType($is_random_address ? 0 : 1)
//使用管理控制台中配置的回信地址(状态必须是验证通过)。
->withReplyToAddress('true')
// 目标地址,多个 email 地址可以用逗号分隔,最多100个地址。
->withToAddress($email)
// 收件标题
->withSubject($subject)
// 收件正文
->withHtmlBody($content);
"message": "Class 'AlibabaCloud\Client\AlibabaCloud' not found", In laravel
When I run the suggested command (composer require alibabacloud/iot) into the main folder of my project I got the next exception:
[Composer\Downloader\TransportException]
The "https://packagist.org/p/provider-2018-10%24f46f061cec1b6a87bfb524e0ffda75e654a332e87c103dbe60e9e0adb50469eb.json" file could not be downloaded (HTTP/1.1 404 Not Found)
文档在哪里?样例在哪里?这不是基本的嘛,花了几天时间,结果是返回用旧版的。
try {
//
$result = AlibabaCloud::nlsFiletrans()->v20180817()
->submitTask()
->withTask($param)
->request();
// 提交成功
if (trim($result['StatusText']) == 'SUCCESS') {
// 返回
return Helper::returnError(0, [
'task_id' => trim($result['TaskId'])
]);
}
} catch (ClientException $e) {
// 客户端异常
return Helper::returnError(1000, [], $e->getErrorMessage());
} catch (ServerException $e) {
// 服务端异常
return Helper::returnError(1000, [], $e->getErrorMessage());
}
报错:
Client 'default' not found
sdk会调用random_int和random_b*** 的php7内置函数导致发送失败!
AlibabaCloud::accessKeyClient($config['sms_appkey'], $config['sms_secretKey'])
->regionId('cn-hangzhou') // replace regionId as you need
->asDefaultClient();
try {
$result = AlibabaCloud::rpc()
->product('Dysmsapi')
// ->scheme('https') // https | http
->version('2017-05-25')
->action('SendSms')
->method('POST')
->options([
'query' => [
'RegionId'=>'cn-hangzhou',
'PhoneNumbers' => $mobile,
'SignName' => $config['sms_product'],
'TemplateCode' => $config['sms_templateCode'],
'TemplateParam' => json_encode(['code'=>$code]),
],
])
->request();
$resp = $result->toArray();
.....
现在这个sdk能用吗?有没有使用文档?
产品和sdk一样烂,bug满天飞
$query = [
'Title' => 'Title',
'Description' => '', // 只要是空的就会报签名错误
'FileName' => 'test.mp4',
];
$request = Vod::v20170321()->createUploadVideo([
'query' => $query,
])->endpoint($endpoint)
->request();
当手动降级alibabacloud/client版本到1.5.24后问题才能修复。
一般使用 阿里云的 sdk 都是使用一小部分. 这个包大且全. 但是里面很多重复的东西是可以提出来重构优化的. 能大大减少文件量和使用成本.
I created queue under Message Notification Service using the console and Now I want to receive message/instruction using PHP SDK, but I didn't find any support for the Message notification service queue(MNS).
Is there SDK available for MNS service? If Yes can you share with me that details Else is there any plan to release?
Thank you in advance.
Action: SingleSendMail (其他方法没测)
实测:
php 7.3.11,php7.4.8
返回签名失败
#errorCode: "SignatureDoesNotMatch"
#errorMessage: "Specified signature is not matched with our calculation.
代码基本是拿官网文档过来后做的修改:
AlibabaCloud::accessKeyClient('xxx','xxx')->regionId('cn-hangzhou')->asDefaultClient();
try {
$options = [
'debug' => true,
'query' => [
'Status' => 'NORMAL',
'RepoNamePrefix' => ''
]
];
$request = Cr::v20160607()
->getRepoList($options);
$r = $request->request();
} catch (ServerException $e) {
echo $e->getResult();
}
最后捕获打出来的结果是:
{"RequestId":"806D70E8-32B0-4F18-8C8A-CA54E5D22E2E","HostId":"location.aliyuncs.com","Code":"Illegal Parameter","Message":"Please check the parameters"}
不清楚是哪里参数有误。
而且API文档https://help.aliyun.com/document_detail/72399.html 上还有个RepoNamePrefix参数,要求是必须提供该参数,但SDK中又没有AlibabaCloud\Cr\V20160607\GetRepoList::withRepoNamePrefix()
这样的函数,所以我通过options['query']进行了传递,不知道是否正确。
accessKeyId和accessKeySecret都是正确的
到底哪里出现了参数错误?
不分包有太多坑,加载一个组件时,结果需要拉取左右组件,发布线上要发布好几千个文件,composer静态加载文件特别大
不分包有太多坑,加载一个组件时,结果需要拉取左右组件,发布线上要发布好几千个文件,composer静态加载文件特别大
比如我只想用一个"移动推送",然而我得把这么大个sdk全down下来??
目前看SLS日志服务的SDK是单独的 https://github.com/aliyun/aliyun-log-php-sdk
是否考虑也加进来统一规范管理
调用机器翻译API,使用PHP SDK存在中文的时候提示请求参数编码有问题,这个需要如何处理? 英文翻译到中文没有问题,但是中文翻译到英文报错提示:Request parameters has malformed encoded characters. 尝试UTF-8处理没有用。
header("Content-Type: text/html;charset=utf-8");
require DIR . '/vendor/autoload.php';
use AlibabaCloud\Client\AlibabaCloud;
use AlibabaCloud\Client\Exception\ClientException;
use AlibabaCloud\Client\Exception\ServerException;
// Download:https://github.com/aliyun/openapi-sdk-php
// Usage:https://github.com/aliyun/openapi-sdk-php/blob/master/README.md
AlibabaCloud::accessKeyClient('*******', '***********')
->regionId('cn-hangzhou')
->asDefaultClient();
try {
$result = AlibabaCloud::rpc()
->product('alimt')
// ->scheme('https') // https | http
->version('2018-10-12')
->action('TranslateGeneral')
->method('POST')
->host('mt.cn-hangzhou.aliyuncs.com')
// ->addHeader("charset", "UTF-8")
// ->addHeader("content-type", "application/x-www-form-urlencoded")
->options([
'query' => [
'RegionId' => "cn-hangzhou",
'FormatType' => "text",
'SourceLanguage' => "zh",
'TargetLanguage' => "en",
'SourceText' => "北京欢迎你",
// 'SourceText' => utf8_encode("北京欢迎你"),
'Scene' => "general",
],
])
->request();
print_r($result->toArray());
} catch (ClientException $e) {
echo $e->getErrorMessage() . PHP_EOL;
} catch (ServerException $e) {
echo $e->getErrorMessage() . PHP_EOL;
}
`
`
AlibabaCloud::accessKeyClient(config('oss.access_key_id'), config('oss.access_key_secret'))
->regionId('cn-beijing')
->asDefaultClient();
$request = AlibabaCloud::imm()->v20170906()->createOfficeConversionTask([
'Project' => 'test',
'SrcUri' => 'oss://xxx-p1-dev/26484f3a6d4d70b4e983a16e1575ef4d83382967.pdf',
'TgtType' => 'jpg',
'TgtUri' => 'oss://xxx-p1-dev/26484f3a6d4d70b4e983a16e1575ef4d83382967.pdf/output',
]);
$result = $request->request();
dump($result);
传递了 Project 还是提示 MissingProject,需要什么姿势去使用呢?谢谢。
你好,我在CCS的配置文件里面发现是这样配置的:
'ccs' => [ 'cn-hangzhou' => 'ccs.aliyuncs.com', ],
但是我在官方文档中看到的URL是这样的:https://cschat-ccs.aliyun.com/openapi/forwardMessage?tntInstId=XXX&scene=YYY&src=outerservice×tamp=1487230487910&digest=ZZZ
域名为什么不对?
另外,官方文档中的forwardMessage、tntInstId在整个SDK中都找不到。
是不是CCS的SDK还不完整?或者是不是我哪里错了?
- PHP 版本:7.2.6
- 平台:docker alpine
- 产品名称:容器镜像服务Cr
- 产品版本:20160607
- API:getRepoList
代码基本是拿官网文档过来后做的修改:
AlibabaCloud::accessKeyClient('xxx','xxx')->regionId('cn-hangzhou')->asDefaultClient(); try { $options = [ 'debug' => true, 'query' => [ 'Status' => 'NORMAL', 'RepoNamePrefix' => '' ] ]; $request = Cr::v20160607() ->getRepoList($options); $r = $request->request(); } catch (ServerException $e) { echo $e->getResult(); }
最后捕获打出来的结果是:
{"RequestId":"806D70E8-32B0-4F18-8C8A-CA54E5D22E2E","HostId":"location.aliyuncs.com","Code":"Illegal Parameter","Message":"Please check the parameters"}不清楚是哪里参数有误。
而且API文档https://help.aliyun.com/document_detail/72399.html 上还有个RepoNamePrefix参数,要求是必须提供该参数,但SDK中又没有AlibabaCloud\Cr\V20160607\GetRepoList::withRepoNamePrefix()
这样的函数,所以我通过options['query']进行了传递,不知道是否正确。accessKeyId和accessKeySecret都是正确的
到底哪里出现了参数错误?
为了偷懒,我copy了别人提交的一样反馈记录.
使用图像搜索,反复确认过instanceName,还用instanceId进行过测试,均有这个问题。运维用python测试可以。
代码如下:
$instanceName = 'my-instance-name';
$content = file_get_contents(storage_path("app/02.jpg"));
AlibabaCloud::accessKeyClient('my-access-key-id', 'my-access-key-secret')
->regionId('cn-shanghai')
->asDefaultClient();
$response = ImageSearch::v20190325()->addImage()
->withInstanceName($instanceName)
->withPicName("testimage1")
->withPicContent(base64_encode($content))
->withProductId('imageproductid1')
->debug(true)
->request();
dump($response);
debug信息:
* Trying 139.196.67.150:80...
* TCP_NODELAY set
* Connected to imagesearch.cn-shanghai.aliyuncs.com (139.196.67.150) port 80 (#0)
> POST /v2/image/add?Version=2019-03-25 HTTP/1.1
Host: imagesearch.cn-shanghai.aliyuncs.com
User-Agent: AlibabaCloud (Darwin 19.2.0; x86_64) Client/1.5.20 PHP/7.2.26 SDK/1.8.49
x-acs-version: 2019-03-25
x-acs-region-id: cn-shanghai
Date: Wed, 08 Jan 2020 07:46:33 GMT
x-acs-signature-method: HMAC-SHA1
x-acs-signature-nonce: c845ccab5c5faa0b9eaddd69d1acb20f
x-acs-signature-version: 1.0
Accept: application/json
Content-Type: application/json; charset=utf-8
Content-MD5: iaWaKljvUjaHN8cW9MGHaA==
Authorization: acs LTAImWU5L09SaUHd:qUQfKKT4VUS2kQadvQ3uVo7F0x4=
Content-Length: 127237
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Date: Wed, 08 Jan 2020 07:46:35 GMT
< Content-Type: application/json; charset=UTF-8
< Content-Length: 285
< Connection: keep-alive
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: POST, GET, OPTIONS
< Access-Control-Allow-Headers: X-Requested-With, X-Sequence, _aop_secret, _aop_signature
< Access-Control-Max-Age: 172800
< x-acs-request-id: B65D5B4A-5D6E-4FA0-A794-C37F91391A88
< Server: Jetty(7.2.2.v20101205)
<
各种Reading和Downloading之后...
Reading /Users/sarry/.composer/cache/repo/https---packagist.phpcomposer.com/provider-phpunit$phpunit-mock-objects.json from cache
Downloading https://repo.packagist.org/p/phpunit/phpunit-mock-objects.json
Resolving dependencies through SAT
Dependency resolution completed in 0.013 seconds
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install alibabacloud/client 1.5.9
- Conclusion: don't install alibabacloud/client 1.5.8
- Conclusion: don't install alibabacloud/client 1.5.7
- Conclusion: don't install alibabacloud/client 1.5.6
- Conclusion: don't install alibabacloud/client 1.5.5
- Conclusion: don't install alibabacloud/client 1.5.4
- Conclusion: don't install alibabacloud/client 1.5.3
- Conclusion: don't install alibabacloud/client 1.5.2
- Installation request for alibabacloud/client (locked at 1.0.23, required as ^1.0) -> satisfiable by alibabacloud/client[1.0.23].
- Conclusion: don't install alibabacloud/client 1.5.1
- alibabacloud/sdk 1.7.0 requires alibabacloud/client ^1.5 -> satisfiable by alibabacloud/client[1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9].
- alibabacloud/sdk 1.7.1 requires alibabacloud/client ^1.5 -> satisfiable by alibabacloud/client[1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9].
- alibabacloud/sdk 1.7.2 requires alibabacloud/client ^1.5 -> satisfiable by alibabacloud/client[1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9].
- alibabacloud/sdk 1.7.3 requires alibabacloud/client ^1.5 -> satisfiable by alibabacloud/client[1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9].
- alibabacloud/sdk 1.7.4 requires alibabacloud/client ^1.5 -> satisfiable by alibabacloud/client[1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9].
- alibabacloud/sdk 1.7.5 requires alibabacloud/client ^1.5 -> satisfiable by alibabacloud/client[1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9].
- alibabacloud/sdk 1.7.6 requires alibabacloud/client ^1.5 -> satisfiable by alibabacloud/client[1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9].
- alibabacloud/sdk 1.7.7 requires alibabacloud/client ^1.5 -> satisfiable by alibabacloud/client[1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9].
- alibabacloud/sdk 1.7.8 requires alibabacloud/client ^1.5 -> satisfiable by alibabacloud/client[1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9].
- alibabacloud/sdk 1.7.9 requires alibabacloud/client ^1.5 -> satisfiable by alibabacloud/client[1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9].
- Conclusion: don't install alibabacloud/client 1.5.0
- Installation request for alibabacloud/sdk ^1.7 -> satisfiable by alibabacloud/sdk[1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.7.9].
Installation failed, reverting ./composer.json to its original content.
https://github.com/aliyun/openapi-sdk-php/blob/master/UPGRADING.md
这个内容没有一点意义,看首页?一大堆源码怎么看是否兼容呢?
当然理论说 1.x 应该是兼容的,只是我希望找官方可以确认下是不是 100% 兼容呢?
您的功能请求是否与问题有关? 请描述一下。
请描述您要解决的问题。
OSS 似乎一直独立于 SDK 之外。什么时候可以集成进来?
描述你想要的解决方案
请描述所需的行为。
集成 OSS
描述您考虑过的替代方案
请描述您考虑的替代解决方案或功能。
If you have a question about Alibaba Cloud that is not a bug report or feature
request, please post it in https://selfservice.console.aliyun.com/ticket/createIndex
Questions posted to this repository will be closed.
你好,我在阿里云的API可视化调试面板上使用PHP删除密钥对的时候报了一个莫名其妙的错误,我很郁闷,我觉得我的请求参数没有错,他为什么总说我填的keypairnames参数无效呢.
REQUEST:
`
<?php
use AlibabaCloud\Client\AlibabaCloud;
use AlibabaCloud\Client\Exception\ClientException;
use AlibabaCloud\Client\Exception\ServerException;
// Download:https://github.com/aliyun/openapi-sdk-php-client
// Usage:https://github.com/aliyun/openapi-sdk-php-client/blob/master/README-CN.md
AlibabaCloud::accessKeyClient('<accessKeyId>', '<accessSecret>')
->regionId('cn-shenzhen')
->asGlobalClient();
try {
$result = AlibabaCloud::rpcRequest()
->product('Ecs')
// ->scheme('https') // https | http
->version('2014-05-26')
->action('DeleteKeyPairs')
->method('POST')
->options([
'query' => [
'RegionId' => 'cn-shenzhen',
'KeyPairNames' => 'aliyunhongkong',
'SourceRegionId' => 'cn-shenzhen',
],
])
->request();
print_r($result->toArray());
} catch (ClientException $e) {
echo $e->getErrorMessage() . PHP_EOL;
} catch (ServerException $e) {
echo $e->getErrorMessage() . PHP_EOL;
}
<?php
use AlibabaCloud\Client\AlibabaCloud;
use AlibabaCloud\Client\Exception\ClientException;
use AlibabaCloud\Client\Exception\ServerException;
// Download:https://github.com/aliyun/openapi-sdk-php-client
// Usage:https://github.com/aliyun/openapi-sdk-php-client/blob/master/README-CN.md
AlibabaCloud::accessKeyClient('<accessKeyId>', '<accessSecret>')
->regionId('cn-shenzhen')
->asGlobalClient();
try {
$result = AlibabaCloud::rpcRequest()
->product('Ecs')
// ->scheme('https') // https | http
->version('2014-05-26')
->action('DeleteKeyPairs')
->method('POST')
->options([
'query' => [
'RegionId' => 'cn-shenzhen',
'KeyPairNames' => 'aliyunhongkong',
'SourceRegionId' => 'cn-shenzhen',
],
])
->request();
print_r($result->toArray());
} catch (ClientException $e) {
echo $e->getErrorMessage() . PHP_EOL;
} catch (ServerException $e) {
echo $e->getErrorMessage() . PHP_EOL;
}
`
RESPONSE:
{ "RequestId": "B43E020F-FDF8-4BF2-BC94-910105185959", "HostId": "ecs.aliyuncs.com", "Code": "InvalidKeyPairNames.ValueNotSupported", "Message": "The specified parameter \"KeyPairNames\" is not valid." }
提示:May not yet support product Sts quick access, you can use [Alibaba Cloud Client for PHP] to send any custom requests: https://github.com/aliyun/openapi-sdk-php-client/blob/master/docs/en-US/3-Request.md
大佬们求救,第一次用阿里云的这种SDK方式。有点懵。如下图所示,提示错误如上图。
我现在是想WEB上传文件到OSS,目前看文档说是要通过AK的方式来获取令牌环,然后用令牌环来上传文件,就是这个accessToken,卡这一步了。不知道逻辑上对不对,求救。
我这边因为项目是php5.6,不能用composer方式引入项目,所以只能去研究阿里云一键取号Api的接口参数去请求,
结果其他请求参数都没有问题,参数Version就报错,https://api.aliyun.com/new?spm=a2c4g.11186623.2.13.2fc27861OpQnPn#/?product=Dypnsapi&version=2017-05-25&api=GetMobile¶ms={%22RegionId%22:%22cn-hangzhou%22}&tab=DEMO&lang=PHP 这个url里面的version是填 2017-05-25,我也是填这个,结果就报错了。 想问下version参数应该怎么填
hi
sdk中提供的mnsClient存在参数问题 导致无法正常获取mns队列消息
我方在升级使用新版php-sdk, 出现无法拉取mns消息bug
阿里云官方工单反馈如下
工程师 60810 号 : 您好,已经为您核实,您的这个sdk不是消息服务mns官方提供的sdk,传的参数WaitSeconds 这个是非标准的,标准的应该是:waitseconds,还要请您知晓哈,官方提供的mns的sdk,您可以参考下
https://help.aliyun.com/document_detail/32381.html?spm=a2c4g.11186623.6.655.2b947f87MOpJpF
您使用这个sdk测试下,看是否还有500的情况呢?
经查证问题出自
AlibabaCloud\Dybaseapi\MNS\Requests\BatchReceiveMessage;
line:86 88 两个参数错误
请核实.
文档要求php版本>5.6,但实际composer安装后,需要php>7.2
其中依赖的组件明确要求php版本>7.2,可能是组件pcr,因此建议:
1、明确组件版本,尽量降低组件对新版的要求;
2、精确本产品安装后的实际版本需求。
PHP Version:php.7.0.33
Platform:macos
Product: alibabacloud/sdk(sts)
Product Version:^1.8
composer 安装报错提示如下:
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- guzzlehttp/guzzle is locked to version 7.2.0 and an update of this package was not requested.
- guzzlehttp/guzzle 7.2.0 requires php ^7.2.5 || ^8.0 -> your php version (7.0.33) does not satisfy that requirement.
Problem 2
- symfony/polyfill-mbstring is locked to version v1.20.0 and an update of this package was not requested.
- symfony/polyfill-mbstring v1.20.0 requires php >=7.1 -> your php version (7.0.33) does not satisfy that requirement.
Problem 3
- guzzlehttp/guzzle 7.2.0 requires php ^7.2.5 || ^8.0 -> your php version (7.0.33) does not satisfy that requirement.
- alibabacloud/client 1.5.29 requires guzzlehttp/guzzle ^6.3|^7.0 -> satisfiable by guzzlehttp/guzzle[7.2.0].
- alibabacloud/client is locked to version 1.5.29 and an update of this package was not requested.
文档要求php版本>5.6,但实际composer安装后,需要php>7.2
其中依赖的组件明确要求php版本>7.2,可能是组件pcr,因此建议:
1、明确组件版本,尽量降低组件对新版的要求;
2、精确本产品安装后的实际版本需求。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.