aliyun / openapi-sdk-php

Alibaba Cloud SDK for PHP
https://packagist.org/packages/alibabacloud/sdk
Other
521 stars 110 forks source link

nlp调用一直返回 SignatureDoesNotMatch: Specified signature is not matched with our calculation #210

Open liulianjun1995 opened 2 years ago

liulianjun1995 commented 2 years ago
           AlibabaCloud::accessKeyClient($this->accessKeyId, $this->accessKeySecret)
                ->regionId('cn-hangzhou')
                ->asDefaultClient();

            $res = AlibabaCloud::rpc()
                ->host('alinlp.cn-hangzhou.aliyuncs.com')
                ->product('Nlp')
                ->action('GetWsChGeneral')
                ->format('JSON')
                ->method('POST')
                ->scheme('https')
                ->options([
                    'query' => [
                        'ServiceCode' => 'alinlp',
                        'Text' => $text,
                        'TokenizerId' => 'GENERAL_CHN',
                        'OutType' => '1',
                        'Version' => '2020-06-29',
                    ]
                ])->request();