Skip to content

接口返回401,我是在是找不到原因,麻烦帮忙看一下 #88

Description

@weadwe01

// 下面的xxx我确定是没有错的,直接复制京东云Access Key管理里面的

  $cred   = new Credentials('xxx', 'xxx');
          $client = new StarshieldClient([
              'credentials' => $cred,
              'version'     => 'latest',
              'scheme'      => 'http',
          ]);
          $result = $client->listOfFirewallRules();
          //         VmClient

        var_dump($result);

// 错误信息是下面这样的

Error executing "ListOfFirewallRules" on "http://starshield.jdcloud-api.com/v1/zones/%7Bzone_identifier%7D/firewall$$rules"; Jdcloud HTTP error: Client error: `GET http://starshield.jdcloud-api.com/v1/zones/%7Bzone_identifier%7D/firewall$$rules` resulted in a `401 Unauthorized` response:
{"error":{"message":"sign result is not same [gw]","status":"ACCESS_ERROR","code":401},"requestId":"ce6ttm6ir2hu3mutbkdp (truncated...)
 401 (client): sign result is not same [gw] - {"error":{"message":"sign result is not same [gw]","status":"ACCESS_ERROR","code":401},"requestId":"ce6ttm6ir2hu3mutbkdpr7j3iecwh77q"}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions