When a connection fails, STYD tells you why. Find that reason below and follow the steps.
Odoo refused the API key
The key was copied only in part, was revoked or has expired. Create a new one.
Open your Odoo database (yourcompany.odoo.com), not your account on odoo.com.
Click your avatar, then My Profile, then Account Security. On Odoo 15 and 16, turn on developer mode first, then go to Preferences, Account Security.
Click New API Key. If Odoo asks for a scope, choose RPC: Odoo 20 refuses a key with any other scope. For the duration, choose the longest option.
Copy the key right away, because Odoo shows it only once, and paste it in full into STYD.
Wrong login or database: where to find my database name
On Odoo 15 to 18, STYD needs the database name and the Odoo login as well as the API key. On Odoo 19 and later, it needs the database name only when your server hosts several databases.
The login is the one of the Odoo user who created the API key, usually the email address they sign in with.
On Odoo Online, the database name is the first part of your address: mycompany for mycompany.odoo.com.
On Odoo.sh or your own server, click Find my database in the connection form. STYD shows the names your server lists.
If your server keeps that list private, ask your Odoo administrator for the exact name. Capital letters count.
Wrong address: this address does not answer like Odoo
STYD needs the public https address you open Odoo with, not your website. A page in front of Odoo, a redirect to another address, or a private address (localhost, your office network) stops the connection. For safety, STYD does not follow a redirect to a new address.
Open Odoo in your browser and sign in.
Copy the address from the bar, for example https://mycompany.odoo.com, and paste it into STYD.
If Odoo works in your browser and the test still fails, ask your administrator to check that your server forwards /jsonrpc to Odoo (and /json/2 on Odoo 19 or later).
If the address does not load at all, check the spelling. If Odoo was down or restarting, test again.
Odoo refused external access: check what your subscription includes
On some Odoo Online plans, Odoo limits API access, and it can then refuse external access to your database. Odoo's pricing page, odoo.com/pricing, lists which plans include External API. Odoo.sh and your own server are not limited this way.
Check what your Odoo subscription includes.
If it does not include External API, change it in your Odoo subscription, or ask your Odoo partner.
If it does, write to us: something else is refusing the connection.
A firewall, Cloudflare or a company sign-in blocks STYD
A firewall (for example Cloudflare), a proxy rule or a company sign-in (SSO, VPN, basic authentication) can stop STYD before it reaches Odoo. Your Odoo and your details are usually fine.
You don't have to change your security on your own. Write to us at florian@speaktoyourdatabase.com with who manages your server, and we'll help you connect.
Your Odoo is being upgraded
While Odoo upgrades a database, nothing can read it. Wait for the upgrade to finish, then test again.
If Odoo is waiting for your administrator to confirm the upgrade, they confirm it in the Odoo database manager.
Once Odoo opens normally in your browser, test the connection again.
Odoo version, user rights and sync
STYD works with Odoo 15 or later. If the version is older, or could not be read, write to us with your version.
If the user of the API key cannot read your contacts, create the key from a user who can read your business data.
If the connection is saved but its first sync failed, open Settings, Connections and click Re-sync on the connection's card.
STYD Bridge: the module or its token
These reasons only concern a connection through the STYD Bridge module.
Check that the Speak To Your Database module is installed on this Odoo database: open Apps and search for it.
In Odoo, open Speak To Your Database, then Connection Setup. Turn the module on if it is off.
Generate a new token and paste it in full into STYD.
Use the address you open Odoo with. If your server hosts several databases, it must open the database where the module is installed.
PostgreSQL or MySQL
If your server only accepts approved addresses (firewall, security group or hosting provider rules), allow STYD's addresses: 109.123.235.222 (IPv4) and 2407:3640:2324:5796::1 (IPv6).
A name that goes through Cloudflare's proxy cannot carry database connections: use a direct, DNS-only name or the server's own address.
Host: the server name or IP address alone, with no port, path or settings. Localhost and private network addresses are refused.
Port: a number, usually 5432 for PostgreSQL and 3306 for MySQL.
User, password and database name must match exactly. A read-only user is all STYD needs, and it must be allowed to connect from STYD's addresses.
STYD connects to a new database only with encryption: remove sslmode=disable and turn on TLS (SSL) on the server.
Still stuck? Write to florian@speaktoyourdatabase.com and Florian will help you himself, for free.