Api Curl命令不返回

Api Curl命令不返回,api,curl,Api,Curl,我正在使用api,在这里找到的文档中: 有一个例子: `curl -H “Authentication-Key: {API Key}” -H “Authentication-Secret:{API secret}” https://{subdomain}.simplicate.nl/api/v2/crm/organization.json` 我在终端中运行了如下代码: curl -H “Authentication-Key:XX” -H “Authentication-Secret:XX” h

我正在使用api,在这里找到的文档中: 有一个例子:

`curl -H “Authentication-Key: {API Key}” -H “Authentication-Secret:{API secret}” https://{subdomain}.simplicate.nl/api/v2/crm/organization.json`
我在终端中运行了如下代码:

curl -H “Authentication-Key:XX” -H “Authentication-Secret:XX” https://mydomain.simplicate.nl/api/v2/crm/organization.json

它运行但不返回任何内容。

您在
“…”中使用的头是错误的。您必须使用双引号
“…”
(不确定它叫什么,标准双引号?)

因此,它应该是:

curl -H "Authentication-Key:XX" -H "Authentication-Secret:XX" https://mydomain.simplicate.nl/api/v2/crm/organization.json
Authentication-Key:XX
Authentication-Secret:XX
请注意,当前您的curl正在发送标题,如下所示,并带有额外的字符

“Authentication-Key:XX”
“Authentication-Secret:XX”
但它应该是:

curl -H "Authentication-Key:XX" -H "Authentication-Secret:XX" https://mydomain.simplicate.nl/api/v2/crm/organization.json
Authentication-Key:XX
Authentication-Secret:XX

-v
参数添加到curl命令并检查是否有任何错误。因此,我使用-v而不是-H@ArminSamNo,在卷曲后加-v…@ArminSam所以我就运行了它,它返回了一堆东西。例如,前3行*IDN支持不存在,无法解析Unicode域*无法解析主机:“身份验证密钥;提供了nodename或servname,或未知*关闭连接#0 curl:(6)无法解析主机:”身份验证密钥;提供了nodename或servname,或未知。您可以在此处添加输出(删除密钥和机密信息后)。