Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Partner Program >

oAuth PHP partner app refresh tokens issue

Started by Simon Barney -   in Partner Program

Hi All,
(app type: Partner)

I am trying to refresh tokens in partner app, but every time i refresh tokens all seems good, but after that when i Post invoices i get invalid signature errors, please could someone help me with refresh token.
Thanks
After refreshing the token try something less complex like get company details.
 

Henzard Kruger  

@henzard. Thanks for your reply, let me try, and get back to you, once again thanks,
 

Simon Barney  

@Henzard, i try that what you advice me. and its working good, i mean after do refresh tokens, i tried get invoices insted of post invoices and its all good, but when i post invoices i get signature invalid error. Please could you advice me further, thanks
 

Simon Barney  

TRY PUT
XeroOAuth->request('PUT', $this->XeroOAuth->url("CreditNotes/$SingleAlloc->CreditNoteID/Allocations", 'core'), array(), $xml);

Kind Regards
Henzard Kruger
Certified Advisor and API developer
Picahoo cc - 0711304241 - henzard@picahoo.co.za
 

Henzard Kruger  

@Henzard i tried PUT and GET methods Both Working good, I only have error On POST method, every time i try to POST invoices i get error 401 "Failed to validate Signature".
any ideas
Thanks
 

Simon Barney  

I get the idea that POST is Create and PUT is UpdateOrCreate thus I just stick with PUT have never gotten POST to work properly
 

Henzard Kruger