aliyun / aliyun-openapi-php-sdk

[Abandoned] Open API SDK for PHP developers
Other
606 stars 806 forks source link

MTS API QueryMediaListByURLRequest 总是报 InputFileUrl Invalid #74

Closed zzwooc closed 6 years ago

zzwooc commented 6 years ago

媒体处理》查询媒体-使用OSS文件地址,这个接口(https://www.alibabacloud.com/help/zh/doc-detail/56797.htm)一直报错:InvalidParameter.InvalidHTTPProtocol The parameter \"InputFileUrl\" is not a valid url,protocol not supported HTTP Status: 400 然而文档里根本就没有 InputFileUrl这个参数,求助

AxiosLeo commented 6 years ago

@sundaywill

https://help.aliyun.com/document_detail/44460.html?spm=a2c4g.11186623.2.46.q9GwMm

在这个文档里 FileURLs 是必须参数的。你应该是少了这个吧。

在我写的SDK里 https://github.com/AxiosCros/aliyun-sdk/blob/master/library/mts/Mts.php 514行 $file_urls 是必须要传的参数。

$result = \aliyun\sdk\mts\Mts::QueryMediaListByURL('file_urls');
dump($result->request()->getContent());
zzwooc commented 6 years ago

@AxiosCros 这个参数我是写了的 $request->setFileURLs($ossDomain . $ossObject); 请求参数如下

{
"IncludeMediaInfo" => "true"
    "IncludePlayList" => "true"
    "IncludeSnapshotList" => "true"
    "FileURLs" => "https://skybc-dev.oss-us-west-1.aliyuncs.com/videos/Ozsq5WOrmpSNHlLw"
    "RegionId" => "us-west-1"
    "AccessKeyId" => "LTAIA4ofVWhl3DGY"
    "Format" => "JSON"
    "SignatureMethod" => "HMAC-SHA1"
    "SignatureVersion" => "1.0"
    "SignatureNonce" => "5996a0136f3195339d5c14520cd466e7"
    "Timestamp" => "2018-08-06T11:57:10Z"
    "Action" => "QueryMediaListByURL"
    "Version" => "2014-06-18"
    "Signature" => "nvph5UnqCPsnn/dMHWTwA+3cbbQ="
}
zzwooc commented 6 years ago

找到问题了,file url,不能是 https