我在进行API调用时遇到问题。有Token,Secret等,没问题。尝试检索联系信息时出现困难。我试图访问Sage开发者论坛,但只是被Sage视线围成一圈。
这是我自己的踪迹。
ACCESS : 2a075f2f204a380505a4f27378056bfa326b582f
REFRESH : 2de459f637c1c89bc7add9a424b04f4a2c29a6ec
POST : POST&https%3A%2F%2Fapi.sageone.com%2Faccounts%2Fv1%2Fcontacts&contact_type=1&1435822573
SIGNING : 4c53564b7b9f1542838e65384b2c506b37bb5c28&2a075f2f204a380505a4f27378056bfa326b582f
HASH : NzY2ODE1ZjJmOTVlMmY5MWVjODI2MjdhMTAyMGMyNWM0N2MyNjA1Ng==
CURL ARGS:
URL : https://api.sageone.com/test/accounts/v1/contacts?contact_type=1
AUTHORIZATION : Bearer 2a075f2f204a380505a4f27378056bfa326b582f
X-SIGNATURE : NzY2ODE1ZjJmOTVlMmY5MWVjODI2MjdhMTAyMGMyNWM0N2MyNjA1Ng==
X-NONCE : 1435822573
ACCEPT : */*
CONTENT-TYPE : application/x-www-form-urlencoded
USER-AGENT : Great Water
STRING : Authorization=Bearer 2a075f2f204a380505a4f27378056bfa326b582f&X-Signature=NzY2ODE1ZjJmOTVlMmY5MWVjODI2MjdhMTAyMGMyNWM0N2MyNjA1Ng==&X-Nonce=1435822573&Accept=*/*&Content-Type=application/x-www-form-urlencoded&User-Agent=Great Water&
RESULTS
{"error":"Authorization header is missing.","error_description":"Please provide an 'Authorization' header with the following format: Bearer xxxxx."}
正如您所看到的,尽管存在授权论证,但Sage拒绝了它。
有什么想法吗?
答案 0 :(得分:0)
不确定您使用的是哪种语言,但github上有几个PHP类可供您参考。
如果您想在本文档中使用clientId / accessToken:https://developers.sageone.com/docs/en/v1
使用EddieHarrison @ https://github.com/eddieharrison/sageone-api-php
的课程如果您从https://accounting.sageone.co.za/Marketing/DeveloperProgram.aspx
请求了Api密钥