Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

This page requires a valid OAuth request key. Please contact the application attemping to access Xer

Started by sakthi prabhakaran -   in API Authentication

Hello,

I am using public type application with my store. I just downloaded the source code and run through local i am getting this error:

This page requires a valid OAuth request key. Please contact the application attemping to access Xero to determine the problem.


I have created the xero test account
I have created the API account
Placed the customer key and Consumer Secret in config.php

$signatures = array( 'consumer_key' => '4DZBSSBTOE6UH2MLMXGIPJWLY95UNF',
'shared_secret' => 'FOTHOP6GKWAVBUMUVUU0ZFBVMOTMIQ',


Thanks,
Sakthi
You get that error if the very first part of the API connection (RequestToken call) fails.
It looks like you might be using the XeroOAuth-PHP code?

If so, you can add ?debug=1 to the end of the PHP script, and that will show any errors you are hitting that might otherwise be hidden. I suspect it may have something to do with the callback domain you are setting.
 

Ronan Quirke (Community Manager)  

Thanks for your response.

yes i am using xeroOAuth-PHP code.
now i am getting this error
CURL ERROR: unable to use client certificate (no key found or wrong pass phrase?)
CURL RESULT: 1

1 have created the in localhost as the url
1. URL: http://localhost/XeroAPI
2. OAuth callback domain to null in the API and oob in my code

Thanks & Regards,
Sakthi
 

sakthi prabhakaran  

yes i am using xeroAuth
still i am getting error
 

sakthi prabhakaran  

My error is unable to use client certificate from curl

I have created API for localhost and OAuth callback domain to empty in api and oob in my code.
 

sakthi prabhakaran  

in the _config.php there are instructions on the comments:
* rsa_private_key: not needed for public applications
* rsa_public_key: not needed for public applications

Remove those values from the $signatures array and also comment out/remove the section ' special options for partner applications' below it.
 

Ronan Quirke (Community Manager)  

Hi Roman
Hope you can help with this as i can't get through and no help as yet:

I'm trying to hook into the xero API but i keep getting error :The page requires a valid OAUTH request key
We have created a type private application name and i also do have the ConsumerKey and the ConsumerSecret.
But when i debug my code i don't get to retrieve the "Request Token Key" and the "requestTokenSecret.

Its says its null

So i get : https://api.xero.com/oauth/Authorize?oauth_token= ITSNULLHERE

Thanks i Advance.
Patrick


Some Updates:
Just investigating do i need to use oauth_callback to get a request token key?
Also do i have to run this app on the same server?
 

CRM Connector  

It is likely your RequestToken call is failing then. You would need to read back the response from that call and see what the error message is. At the moment your app is continuing on to the authorization screen regardless of the fact that there has been an error, hence the issue you keep seeing.

It will likely be one of these: http://blog.xero.com/developer/api-overview/oauth-issues/
 

Ronan Quirke (Community Manager)