Giter Site home page Giter Site logo

OpenSSL::SSL::SSLError problem about gibbon HOT 9 CLOSED

amro avatar amro commented on August 20, 2024
OpenSSL::SSL::SSLError problem

from gibbon.

Comments (9)

amro avatar amro commented on August 20, 2024

The datacenter to hit is parsed from the API key. Did you set one?

Otherwise I need more information.

On May 3, 2014, at 1:35 PM, Mohamed El Mahallawy [email protected] wrote:

2.1.1 :007 > gb.lists.list
OpenSSL::SSL::SSLError: hostname "api.mailchimp.com" does not match the server certificate
from /Users/mmahalwy/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl/ssl.rb:139:in post_connection_check' from /Users/mmahalwy/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:922:inconnect'
from /Users/mmahalwy/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:863:in do_start' from /Users/mmahalwy/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:852:instart'
from /Users/mmahalwy/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1369:in request' from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/rack-mini-profiler-0.9.1/lib/patches/net_patches.rb:7:inblock in request_with_mini_profiler'
from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/rack-mini-profiler-0.9.1/lib/mini_profiler/profiling_methods.rb:40:in step' from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/rack-mini-profiler-0.9.1/lib/patches/net_patches.rb:6:inrequest_with_mini_profiler'
from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/httparty-0.13.1/lib/httparty/request.rb:93:in perform' from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/httparty-0.13.1/lib/httparty.rb:521:inperform_request'
from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/httparty-0.13.1/lib/httparty.rb:473:in post' from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/gibbon-1.1.2/lib/gibbon/api_category.rb:28:incall'
from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/gibbon-1.1.2/lib/gibbon/api_category.rb:48:in method_missing' from (irb):7 from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/commands/console.rb:90:instart'
from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/commands/console.rb:9:in start' from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/commands.rb:62:in<top (required)>'
from bin/rails:4:in require' from bin/rails:4:in

'2.1.1 :008 >


Reply to this email directly or view it on GitHub.

from gibbon.

mmahalwy avatar mmahalwy commented on August 20, 2024

You're right! Didn't set that. Thanks Amro

from gibbon.

amro avatar amro commented on August 20, 2024

Certainly. Glad you got it working. :)

On May 3, 2014, at 1:56 PM, Mohamed El Mahallawy [email protected] wrote:

You're right! Didn't set that. Thanks Amro


Reply to this email directly or view it on GitHub.

from gibbon.

mmahalwy avatar mmahalwy commented on August 20, 2024

Actually, I got it semi working:

 def mailchimp
        @omn = env["omniauth.auth"]
        @mailchimp = Integration.create_mailchimp(env["omniauth.auth"])


        Gibbon::API.api_endpoint = @mailchimp.other["api_endpoint"]
        @gb = Gibbon::API.new( @mailchimp.access_key )

        @list = @gb.lists.list


    end

Keeps throwing the OpenSSL error. But when I do:

def mailchimp
        @omn = env["omniauth.auth"]
        @mailchimp = Integration.create_mailchimp(env["omniauth.auth"])

        @mailchimp = @mailchimp.reload

        Gibbon::API.api_endpoint = @mailchimp.other["api_endpoint"]
        @gb = Gibbon::API.new( @mailchimp.access_key )

        @list = @gb.lists.list


    end

Doesn't throw error. Mind you, the mailchimp action is my callback action in the integrations_controller

from gibbon.

mmahalwy avatar mmahalwy commented on August 20, 2024

When using the export. Can I send an api_endpoint for the export?

I am now getting this:

You are accessing the wrong datacenter - your client library may not
properly support our datacenter mapping scheme.

from gibbon.

amro avatar amro commented on August 20, 2024

Mohamed, just set a proper API key as per the docs. Gibbon figures out the endpoint for you. The API key should be of the form:

XXXXXXXXXXXX...XXXX-US(n)

On May 3, 2014, at 2:48 PM, Mohamed El Mahallawy [email protected] wrote:

Reopened #84.


Reply to this email directly or view it on GitHub.

from gibbon.

mmahalwy avatar mmahalwy commented on August 20, 2024

What if I want to use OAuth for that? On behalf of a user

On Sat, May 3, 2014 at 3:29 PM, Amro Mousa [email protected] wrote:

Mohamed, just set a proper API key as per the docs. Gibbon figures out the
endpoint for you. The API key should be of the form:

XXXXXXXXXXXX...XXXX-US(n)

On May 3, 2014, at 2:48 PM, Mohamed El Mahallawy <
[email protected]> wrote:

Reopened #84.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/84#issuecomment-42114157
.

Mohamed El Mahallawy

@mmahalwy4167101981

from gibbon.

amro avatar amro commented on August 20, 2024

The access_token returned by the OAuth process is actually an API key minus the datacenter. The last step shown here is to use that access_token to fetch metadata. Once you do that, you can concatenate the access_token (use a hyphen so it's in the format I described earlier) with the datacenter provided and set it on Gibbon.

The Export API has a different endpoint, which is why you ran into the error. If you just set the full API key, Gibbon will take care of the rest for you.

from gibbon.

mmahalwy avatar mmahalwy commented on August 20, 2024

You're magical! Can't believe I didn't think of that myself! Just implemented and works great!

from gibbon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.