Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
curl在GET调用中是否需要用于API身份验证的头?_Api_Authentication_Curl - Fatal编程技术网

curl在GET调用中是否需要用于API身份验证的头?

curl在GET调用中是否需要用于API身份验证的头?,api,authentication,curl,Api,Authentication,Curl,例如: 下面是一个关于使用curl从ShippingEasy restful API查询订单的问题: 根据API签名的方向为其创建字符串([https://shippingeasy.readme.io/docs/authentication-signing-requests])如下所示:GET&/api/orders&api\u key=xxx&api\u timestamp=1601121474,&order\u number=123456 使用上述字符串和api密钥(私钥)使用HMAC SH

例如:

下面是一个关于使用curl从ShippingEasy restful API查询订单的问题:

根据API签名的方向为其创建字符串([https://shippingeasy.readme.io/docs/authentication-signing-requests])如下所示:
GET&/api/orders&api\u key=xxx&api\u timestamp=1601121474,&order\u number=123456

使用上述字符串和api密钥(私钥)使用HMAC SHA265获得签名(sss)。 然后按照其方向()执行如下curl命令

但是,curl正在返回
{“errors”:[{“message”:“Access denied.”,“status”:401}}

用于计算unix历元时间的PST时区。ShippingEasy位于德克萨斯州(中部时区)

我已经使用该站点验证了生成签名的HMAC SHA265方法

事先谢谢你的帮助

curl "https://app.shippingeasy.com/api/orders?api_key=xxx&api_signature=sss&api_timestamp=1601121474,&order_number=123456