regionId('cn-beijing')->asDefaultClient(); //设置参数,发起请求。 try { $result = AlibabaCloud::rpc() ->product('Sts') ->scheme('https') // https | http ->version('2015-04-01') ->action('AssumeRole') ->method('POST') ->host('sts.aliyuncs.com') ->options([ 'query' => [ 'RegionId' => "cn-beijing", 'RoleArn' => "acs:ram::1118875946432366:role/api", 'RoleSessionName' => "upload", ], ]) ->request(); print_r($result->toArray());die; } catch (ClientException $e) { echo $e->getErrorMessage() . PHP_EOL;die; } catch (ServerException $e) { echo $e->getErrorMessage() . PHP_EOL;die; } return array('oss', '', ''); } public function callback() { $body = file_get_contents('php://input'); Dever::log($body, 'oss_callback'); $body = json_decode($body, true); return $body; } # 视频转码 public function convert($key, $file, $config, $upload) { } }