Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

Getting error oauth_problem=signature_invalid when using contactID in Reports API

Started by Krishna Silalahi -   in API Authentication

Hi,

I Keep getting oAuth error:
oauth_problem=signature_invalid&oauth_problem_advice=Failed%20to%20validate%20signature
everytime I use contactID as parameter to get AgedPayablesByContact Report through the API.

Documentation at http://blog.xero.com/developer/api/Reports/ does not show example url for contact
id parameter so I don't know where else to look. There is no other error explanation apart from that
message.

I came up with url:
https://api.xero.com/api.xro/2.0/Reports/AgedPayablesByContact?contactID=="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
but this does not work for me.

Also tried:
https://api.xero.com/api.xro/2.0/Reports/AgedPayablesByContact?contactID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
https://api.xero.com/api.xro/2.0/Reports/AgedPayablesByContact?contactID==xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
https://api.xero.com/api.xro/2.0/Reports/AgedPayablesByContact?where=contactID=="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
but still no luck.

Did I miss something or can anyone tell me a correct format ? I am also under the impression that
the documentation is not complete, lacking in examples and detailed explanations which are
important in building correct acceptable request url for the API.

Thanks.
After consulting via email i found the correct format:
https://api.xero.com/api.xro/2.0/Reports/AgedPayablesByContact?ContactID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
which means upper case C, single equal sign and no quotes.

Complete url:
https://api.xero.com/api.xro/2.0/Reports/AgedPayablesByContact?ContactID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&fromDate=2011-10-01T00:00:00&toDate=2011-10-31T00:00:00
which also works.
 

Krishna Silalahi  



I am getting the same error, tried your solution as well my making upper case C, single equal sign and no quotes.
Still no luck....

Please help me in this,

My Request URL with Signature is as follows :


https://api.xero.com/api.xro/2.0/Reports/AgedPayablesByContact?oauth_consumer_key=IVYNWOCZRN9KEOT4CIF2RY5RDJHD6H&oauth_nonce=3ffbe2c14d3109bdbb6f243f19a5977a&oauth_signature_method=RSA-SHA1&oauth_timestamp=1492071634&oauth_token=IVYNWOCZRN9KEOT4CIF2RY5RDJHD6H&oauth_version=1.0&ContactID=eca3de96-1939-43bc-a828-f0cfa161f686&oauth_signature=Auy5CRpQXOO2Gdd4J0L7HmxQ6wg1ulTfvULXSncwEc2TOt9vTpu8AcNNUn%2BKbhmPBioGIq%2BjnuqFwcNwolManEsCUmE%2BpcMHiLbZrQwK2ebgC8U32gaJiVnrAL28tsY910JTavTAX9TyC70PUd6KFwfFHZsj58pbBDytsw01B0U%3D
 

Atlas Consulting  

I got the error message today, and all I had to do was delete my application on Xero, re-register one with new keys and certificates, upload those to my project, and everything worked fine after that.
 

Carl Reyneke