Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Umělá inteligence
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    • Partnerský program
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Odoo api and react native

Odebírat

Get notified when there's activity on this post

This question has been flagged
apiodooodoo9odoo18
2 Odpovědi
2096 Zobrazení
Avatar
Dev

Hello everyone, I am seeking assistance with integrating odoo 18, odoo 19  Odoo's API with a React Native Expo application.Is it possible to establish this connection? If so, could someone please provide a detailed example of how to achieve this integration? Thank you in advance for your help!

0
Avatar
Zrušit
Codesphere Tech

Hello,
Please review this:
https://www.odoo.com/documentation/18.0/developer/reference/external_api.html

Codesphere Tech

So what do you want to know?

Dev
Autor

Thank you, but is not explain detail 


Avatar
Sandeep Paulraj R
Nejlepší odpověď

Yes, Odoo 18 and Odoo 19 can be integrated with a React Native Expo application using Odoo's JSON-RPC API.

A common approach is to authenticate the user and then call Odoo models using the /web/session/authenticate and /web/dataset/call_kw endpoints.

Example authentication request:

const response = await fetch(
  "https://your-odoo-instance.com/web/session/authenticate",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      jsonrpc: "2.0",
      params: {
        db: "your_database",
        login: "user@example.com",
        password: "your_password",
      },
    }),
  }
);

const result = await response.json();

Reading records from Odoo:

const response = await fetch(
  "https://your-odoo-instance.com/web/dataset/call_kw",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    credentials: "include",
    body: JSON.stringify({
      jsonrpc: "2.0",
      method: "call",
      params: {
        model: "res.partner",
        method: "search_read",
        args: [[]],
        kwargs: {
          fields: ["name", "email"],
          limit: 10,
        },
      },
    }),
  }
);

const partners = await response.json();

The same approach can be used for create, write, unlink, and custom model methods by changing the method name in call_kw.

For production deployments, avoid storing Odoo user credentials directly in the mobile application. A common practice is to create a custom controller in Odoo that exposes only the required endpoints and handles authentication securely.

0

Odebírat

Avatar
Zrušit
Avatar
Atliis 360
Nejlepší odpověď
Hi,

Yes, you can absolutely integrate Odoo 18/19 with React Native Expo! Since Odoo exposes a JSON-RPC API over HTTP, any app that can make HTTP requests can talk to it — and Expo's built-in fetch works perfectly.

Basic example using the native JSON-RPC endpoint:


// Authenticate
const authRes = await fetch('https://your-odoo.com/web/dataset/call_kw', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'call',
    params: {
      model: 'res.users',
      method: 'authenticate',
      args: ['your-db', 'user@example.com', 'password', {}],
      kwargs: {},
    },
  }),
});
const { result: uid } = await authRes.json();
Once you have the uid and session cookie, you can call any model the same way using call_kw with read, search_read, write, etc.

That said, if you want a cleaner REST interface (proper endpoints, Bearer token auth, no JSON-RPC boilerplate), check out REST API Toolkit on the Odoo App Store — it supports Odoo 19 and makes the Expo integration much simpler.

We have actually built a React Native app on top of it ourselves, so we can confirm this integration works well end-to-end:


// Login
const res = await fetch('https://your-odoo.com/api/v1/auth/login', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ login: 'user@example.com', password: 'password' }),
});

// Fetch records
const records = await fetch('https://your-odoo.com/api/v1/res.partner', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});

Hope that helps!

0

Odebírat

Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
What is an API, and how does it work? Can you provide an example of how an API is used in a real-world scenario?
api odoo
Avatar
0
čvc 26
12
odoo migration from custom plan online to on premises
odoo odoo18
Avatar
Avatar
Avatar
Avatar
3
říj 25
4110
Odoo Session Expired Error When Accessing API Endpoint
api odoo
Avatar
Avatar
2
pro 24
5672
How to bring products from opportunity to quotation
odoo odoo9
Avatar
0
říj 23
5122
How to get data with rest API and post it in odoo view? Vyřešeno
api odoo
Avatar
Avatar
1
úno 22
6834
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) Português română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now