Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

oauth problem signature invalid ...

Started by Phil Rutherford -   in API Authentication


I am having issue while export invoice into to Xero using Post Method. I keep getting this error


We have completed the Authorising and Requesting Token and have no issues.

More info in this regard:

1. We are using Public Method
2. Works when we use the "PUT" method
3. We have two companies - One Demo and One Live. However, we are authorising for the LIVE company only. Can that be the issue?

Incidently, while sending contact info to XERO it works fine.

Can anyone suggest if we are doing anything wrong?
@Phil - We have some great wrapper libraries available that take care of generating signatures for your requests. Are you using one of these?

Tony Rule (Xero Staff)  

i am using XeroOAuth-PHP wrapper and i am getting an error on passing debug=1 on example.php, that :

signed_url: https://api.xero.com/oauth/RequestToken?oauth_callback=http%3A%2F%2Flocalhost%2Fxero%2Fexample%2Fexample.php&oauth_consumer_key=YYTI7LFS9R7ZGSCTCJGPCRSA2IF6RP&oauth_nonce=sHpop&oauth_signature=B03auSvTsVI0GfpI2886nLH1yHM%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1345709253&oauth_version=1.0&scope=https%3A%2F%2Fapi.xero.com%2Fapi.xro%2F2.0
oauth_problem=signature_invalid&oauth_problem_advice=Failed%20to%20validate%20signatureCURL RESULT: 1

while if i didn't pass debug=1 than dashboard is loaded with an error request token is not valid, contact to the application.

my application is public and i have commented few lines in config that are used in case of partner application.

test best