Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
577 Visualizzazioni

Dear all,

Odoo supports OAuth authorization for Gmail and Outlook email accounts.

But we use Yahoo as our email server.

The link below explains that Yahoo has now removed password support.

https://help.yahoo.com/kb/SLN36636.html

How can we add OAuth authorization within Yahoo?

Thanks

Avatar
Abbandona
Risposta migliore

Integrating Yahoo Mail with Odoo using OAuth is feasible, even though Yahoo has removed basic password-based authentication. You can set up OAuth for Yahoo by following these steps:

1. Understand Yahoo’s OAuth Requirements

Yahoo supports OAuth 2.0 for third-party application access. To use OAuth with Yahoo in Odoo, you must:

  • Register your application with Yahoo Developer Console.
  • Obtain the client_id and client_secret for OAuth.
  • Configure Odoo's email settings to use Yahoo's IMAP/SMTP servers with OAuth tokens.

2. Register Your Application in Yahoo Developer Console

  1. Create a Yahoo Developer Account:
  2. Create a New Application:
    • Click on My Apps and select Create an App.
    • Provide the following:
      • Application Name: A name for your app (e.g., "Odoo Email Integration").
      • Redirect URI: Use https://localhost for testing or provide Odoo's redirect URL in production, such as https://your-odoo-domain.com/auth_oauth/signin.
      • Permissions: Select Mail, Contacts, and Calendar for access.
  3. Save and Obtain Credentials:
    • After saving, Yahoo will generate a Client ID and Client Secret. Note these for later configuration in Odoo.

3. Configure OAuth in Odoo

  1. Install OAuth2 in Odoo:
    • Ensure the auth_oauth module is installed in Odoo.
    • Go to Settings > Integrations > OAuth Providers.
  2. Add Yahoo as an OAuth Provider:
    • Click Create and configure:
      • Provider Name: Yahoo
      • Client ID: Use the Client ID from Yahoo Developer Console.
      • Client Secret: Use the Client Secret.
      • Redirect URI: Ensure it matches the URI registered in Yahoo.
      • Scope: openid mail.
      • OAuth Endpoint URLs:
        • Authorization URL: https://api.login.yahoo.com/oauth2/request_auth
        • Token URL: https://api.login.yahoo.com/oauth2/get_token
  3. Test the Configuration:
    • Verify that the OAuth flow is working by testing the connection.

4. Configure Yahoo IMAP/SMTP in Odoo

  1. Yahoo IMAP/SMTP Settings with OAuth:
    • IMAP Server: imap.mail.yahoo.com
    • IMAP Port: 993
    • SMTP Server: smtp.mail.yahoo.com
    • SMTP Port: 465
  2. Use OAuth Tokens in Odoo:
    • Go to Settings > Email > Outgoing Mail Servers (for SMTP) or Incoming Mail Servers (for IMAP).
    • Add Yahoo as a mail server and use the following:
      • Username: Your Yahoo email address.
      • Authentication Method: OAuth2.
      • Access Token: Generated during the OAuth flow.

5. Troubleshoot and Test

  • Ensure Yahoo’s OAuth credentials are correctly set up in both Yahoo Developer Console and Odoo.
  • Test the email flow by sending a test email from Odoo.
  • Verify IMAP integration by fetching emails.

Key Notes

  • Yahoo’s Security Requirements: Yahoo enforces secure access, so ensure your application uses HTTPS for OAuth callbacks in production.
  • Access Token Refresh: Odoo's OAuth implementation should handle token refresh automatically. Verify this during testing.
  • SMTP Authentication Error: If you encounter an error, ensure the app has the correct permissions and OAuth is configured properly.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
dic 22
1890
0
dic 22
6710
2
mar 21
12642
1
mag 15
4883
1
mar 15
11572