Skip to content
Advertisement

Cannot access to Odoo External API using PHP 7 XML-RPC – Access Denied, Fatal error Uncaught Ripcord_TransportException

I want to use Odoo’s External API on my website, using PHP 7.

Like it is said in the Odoo’s documentation, I’ve placed the Ripcord library in my httpdocs. I have also activated the XML RPC extension on my server, OpenSSL was already activated, and the website is even secured (there’s the lock icon in the address bar).

I want to test that with Odoo Demo Trial before we buy licenses. So in my PHP code, I have put the same username/password as the one I used to connect to my Odoo demo account.

1°) But I get faultCode and faultString (Access Denied)

JavaScript

Output :

JavaScript

2°) When the start() method is called, I get Fatal error: Uncaught Ripcord_TransportException: Could not access

JavaScript

Output :

JavaScript

(Maybe similar posts out there, but somewhat hazy :

How to use PHP7 Ripcord library to get Odoo data? .

Odoo + Ripcord PHP XMLRPC library: “Could not access https://demo.odoo.com/start” )

So, I still don’t know what the real problem is.

Any idea please ?

Advertisement

Answer

1°) After a while searching for a solution, I finally decided to purchase some modules, instead of using the Odoo Demo account.

So, I just changed the credentials for my new database, and also opened the 8069 port for that specific URL. And it worked 🙂

Code :


JavaScript

Output :


JavaScript

2°) The start( ) method won’t work with the specific URL though

So, I’m not sure that the start( ) method will work with something else than a Demo account.

Also, Odoo’s support told me to not include the “/start” part of the URL in the script. But, with or without the “/start” part, it didn’t work.

Code :


JavaScript

Output :


JavaScript

My Conclusion is :

Odoo DEMO has NOT worked for me, even if I followed the instructions from here :

Odoo’s documentation

EDIT :

1°) a/ We can get an IP Address (url is like “http://xxx.xxx.xxx.xxx”) when we install manually our odoo server onto a different host server of our choice.

1°) b/ But if the odoo server is installed onto Odoo’s official website (url is like “https://thedatabasename.odoo.com”), we have no IP Address. And I managed to open the 8069 port by asking for it to the web host support of my website.

So, to make it simple, I edited “http://xxx.xxx.xxx.xxx” to “https://thedatabasename.odoo.com”, for the case 1°) b/ :

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement