Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

"consumer_key_unknown" returned when parameters are used for ProfitAndLoss

Started by BinaryFold4 Accounts -   in API Authentication

Hi

I am attempting to get this months and the YTD report for my P&L

The following works fine:

https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss

But this fails:

https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate=2011-01-01&toDate=2011-12-31

Note I have tried multiple URL formats like:

https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate=01+Jan+2011&toDate=31+Dec+2011

This also fails and results in:

oauth_problem=consumer_key_unknown
oauth_problem_advice=Consumer key was not recognised

Does anyone know why this happens, do I need to do something different when sending params with my request?

Thanks
Jake
@Jake - sorry for the delayed reply. If you're still stuck, can you let us know what wrapper library you are using so we can try and replicate the issue.
 

Tony Rule (Xero Staff)  

Hi, I am facing exactly the same problem.
Using "XeroOAuth-PHP" wrapper library.

Can someone please help.

@Jake - If you found the solution to this, can you please share.

Thanks
Ammarr.
 

Ammarr Hafiz  

Hi,

I am also facing the same issues with XeroOAuth-PHP. Attachements worked for me initially, however now its coming up with this error.

Kind Regards,
Brett
 

Brett Tasker  

I am facing same issue!!!
 

Nishant Nanavati  

Yeah same issue, when adding the ?offset= parameter to journals. Does anyone have any ideas?
 

Sam Tudman  

Hello, I am facing the same issue, though on get request for invoices. The same code worked just last week, has something changed?
 

Ikenna Apeh  

Hello, am also facing the same problem. wondering if there is any follow up to this issue.

for me it works fine with this:
https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate=2017-09-01

But doesnt work for this:
https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate=2017-09-01&toDate=2017-09-30
- response i get is: oauth_problem=signature_invalid&oauth_problem_advice=Failed%20to%20validate%20signature
 

sabri mansor  

I am having the same issue using Google Scripts. It works with the base url and doesn't work when parameters are added. This is the response: oauth_problem=signature_invalid&oauth_problem_advice=Failed%20to%20validate%20signature
 

Danyal Khan