aliyun / aliyun/openapi-sdk-php

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

Open
#210 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
530
Forks
110
PR merge metrics
No merged PRs in 30d

Description

  • PHP Version:7.4.3
  • Platform:wsl
  • Product:nlp
  • Product Version:SignatureDoesNotMatch: Specified signature is not matched with our calculation
  • API:
           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();

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the provided PHP entry points, AlibabaCloud::accessKeyClient and AlibabaCloud::rpc, using the Nlp product, GetWsChGeneral action, and cn-hangzhou host. Check the request details and signing inputs, then confirm the request succeeds without SignatureDoesNotMatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.