# Connecting to Odoo Online and odoo.sh

Hosted Odoo editions - JSON-RPC over TLS on port 443 with an API key instead of a password.

The hosted Odoo editions - Odoo Online and odoo.sh - expose the same external API as self-hosted Odoo, so everything in the other Odoo chapters applies to them without changes. What differs is how the connection itself is configured.

## Connection settings {#connection-settings}

When filling in the connection's form, as described in the [main Odoo chapter](https://zato.io/docs/dev/odoo/index.html), use the following values:

- Host: yourcompany.odoo.com - the address of your instance, without any protocol prefix
- Port: 443 - hosted Odoo is always behind TLS
- Protocol: JSON-RPCS - JSON-RPC over TLS
- Database: the name of your database, which for Odoo Online is shown in the database manager at odoo.com/my/databases
- User: the login of the Odoo user the integration runs as

## [API keys](https://zato.io/docs/security/api-keys.html) instead of passwords {#api-keys-instead-of-passwords}

Since Odoo 14, the external API of hosted editions requires API keys - the login password will not work for API access. To create a key, in Odoo go to your user's **Preferences** > **Account Security** > **API Keys** and click **New API Key**.

The key is used in place of a password - after creating the connection in the Zato Dashboard, use its **Change password** option and enter the API key there. Nothing else changes, the key is sent exactly where a password would be.

Once the connection is saved, click **Ping** in the connection list to confirm that the credentials and the database name are correct.

## Trial databases {#trial-databases}

One caveat applies to Odoo Online specifically - databases on a free trial cannot use the external API at all. The subscription needs to be a paid one, including the one-app-free plan, for API keys to work.

## Learn more {#learn-more}

- [Odoo integrations](https://zato.io/docs/dev/odoo/) - Odoo models from Python services, over XML-RPC and JSON-RPC
- [Reading data](https://zato.io/docs/dev/odoo/reading-data/) - Searching, reading and field lists against any Odoo model
- [Creating records](https://zato.io/docs/dev/odoo/creating-records/) - New partners, leads and orders, with their related records
- [Updating and deleting](https://zato.io/docs/dev/odoo/updating-records/) - Writing to many records at once and removing them
- [Odoo calls Zato](https://zato.io/docs/dev/odoo/odoo-calls-zato/) - Automation rules and webhooks that invoke your services
