From https://github.com/freakboy3742/pyxero#private-applications

From https://developer.xero.com/documentation/api-guides/create-publicprivate-key

➤ openssl genrsa -out privatekey.pem 1024
Generating RSA private key, 1024 bit long modulus

➤ openssl req -new -x509 -key privatekey.pem -out publickey.cer -days 1825
Country Name (2 letter code) [AU]:GB
State or Province Name (full name) [Some-State]:Devon
Locality Name (eg, city) []:Okehampton
Organization Name (eg, company) [Internet Widgits Pty Ltd]:KB Software Ltd
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:kbsoftware.co.uk
Email Address []:patrick@kbsoftware.co.uk

➤ openssl pkcs12 -export -out public_privatekey.pfx -inkey privatekey.pem -in publickey.cer
Enter Export Password:
Verifying - Enter Export Password:




If you get Failed to Create App, then try logging out and back in again (or browse to some of the profile pages).


Copy the Consumer Key from OAuth 1.0a Credentials to the .private file in your project e.g:


If you log into your Xero app, you can see the Connected App (not so easy to find) e.g:



pip install pyxero