Skip ke Konten
Odoo Menu
  • Sign in
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Helpdesk
    • Planning
    • Appointment
    Produktivitas
    • Discuss
    • Kecerdasan Buatan
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Manajemen Properti
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Odoo Partner
    • Agensi Marketing
    • Firma hukum
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    • Program Afiliasi
    Dapatkan Layanan
    • Cari Partner
    • Cari Akuntan
    • Konsultasi
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Odoo api and react native

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
apiodooodoo9odoo18
2 Replies
2092 Tampilan
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
Buang
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
Penulis

Thank you, but is not explain detail 


Avatar
Sandeep Paulraj R
Jawaban Terbai

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

Langganan

Avatar
Buang
Avatar
Atliis 360
Jawaban Terbai
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

Langganan

Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
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
Jul 26
12
odoo migration from custom plan online to on premises
odoo odoo18
Avatar
Avatar
Avatar
Avatar
3
Okt 25
4110
Odoo Session Expired Error When Accessing API Endpoint
api odoo
Avatar
Avatar
2
Des 24
5672
How to bring products from opportunity to quotation
odoo odoo9
Avatar
0
Okt 23
5122
How to get data with rest API and post it in odoo view? Diselesaikan
api odoo
Avatar
Avatar
1
Feb 22
6834
Komunitas
  • Tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Upgrade
  • Custom Development
  • Pendidikan
  • Cari Akuntan
  • Cari Partner
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Karier
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah software terintegrasi dengan 70+ aplikasi seperti CRM, Akuntansi, Inventaris, Sales, eCommerce, Marketing, POS; plus fitur lokal Indonesia!

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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