You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.
I've been trying to get our API working using partner oauth and have had no success; getting continual forbidden errors.
HTTP Error 403.7 - Forbidden
The page you are attempting to access requires your browser to have a Secure Sockets Layer (SSL) client certificate that the Web server recognizes.
I've read that partner oauth should now be working, here's the code I'm using:
var partner_app_api = new XeroCoreApi("https://api-partner.network.xero.com", new PartnerAuthenticator("https://api-partner.network.xero.com",
"https://api.xero.com", "oob", new MemoryTokenStore(),
@"Z:\Steve\SparkleShare\public_privatekey.pfx",
@"Z:\Steve\SparkleShare\entrust.p12",
"password for entrust cert"),
new Consumer("key", "secret"), user,
new DefaultMapper(), new DefaultMapper());
var partner_contacts = partner_app_api.Contacts.Find().ToList();
partner_contacts.PrintDump();
To be honest, I get a bit confused with the documentation around the certificates and what they're 'called', but the above certificates are:
Hi, this code looks ok, looks to be a SSL certificate issue (entrust cert) have you got the cert (.p12) installed into the Trusted Root Certification Authorities store ?
I didn't know it was a pre-req of the .NET wrapper to install the entrust cert in the TRCA store; thought it was stand-alone and handled by the .NET framework signing. I'll try installing and get back to you.
@ronanq Thanks for the tip :) I was more looking for direct guidance on correct usage of the .NET wrapper which is why this issue exists. I've contacted dev community as well. Regards.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've been trying to get our API working using partner oauth and have had no success; getting continual forbidden errors.
HTTP Error 403.7 - Forbidden
The page you are attempting to access requires your browser to have a Secure Sockets Layer (SSL) client certificate that the Web server recognizes.
I've read that partner oauth should now be working, here's the code I'm using:
To be honest, I get a bit confused with the documentation around the certificates and what they're 'called', but the above certificates are:
Z:\Steve\SparkleShare\public_privatekey.pfx = the one created here http://developer.xero.com/documentation/advanced-docs/public-private-keypair/
Z:\Steve\SparkleShare\entrust.p12 = the one I downloaded from entrust
All the details in 'My Applications' look to be setup correctly, and the public cert is a valid one generated using public_privatekey.pfx.
The text was updated successfully, but these errors were encountered: