Comments (9)
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
'2.1.1 :008 >
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:inpost_connection_check' from /Users/mmahalwy/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:922:in
connect'
from /Users/mmahalwy/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:863:indo_start' from /Users/mmahalwy/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:852:in
start'
from /Users/mmahalwy/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1369:inrequest' from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/rack-mini-profiler-0.9.1/lib/patches/net_patches.rb:7:in
block 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:instep' from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/rack-mini-profiler-0.9.1/lib/patches/net_patches.rb:6:in
request_with_mini_profiler'
from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/httparty-0.13.1/lib/httparty/request.rb:93:inperform' from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/httparty-0.13.1/lib/httparty.rb:521:in
perform_request'
from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/httparty-0.13.1/lib/httparty.rb:473:inpost' from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/gibbon-1.1.2/lib/gibbon/api_category.rb:28:in
call'
from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/gibbon-1.1.2/lib/gibbon/api_category.rb:48:inmethod_missing' from (irb):7 from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/commands/console.rb:90:in
start'
from /Users/mmahalwy/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/commands/console.rb:9:instart' 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:inrequire' from bin/rails:4:in
—
Reply to this email directly or view it on GitHub.
from gibbon.
You're right! Didn't set that. Thanks Amro
from gibbon.
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.
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.
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.
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.
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.
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.
You're magical! Can't believe I didn't think of that myself! Just implemented and works great!
from gibbon.
Related Issues (20)
- pass the content in campaign
- Cannot set faraday_adapter globally HOT 3
- Uninitialized constant Faraday::Error::ClientError HOT 3
- Changelog updates for 3.3.2 HOT 2
- NameError: uninitialized constant Faraday::Error::ClientError HOT 3
- Rescued errors come back with all nil values? HOT 8
- Got error saying api_key not found HOT 1
- gibbon report issue
- How to send campaign emails to some specific users? HOT 1
- How to delete a member from a list? HOT 5
- How to add member in the segment of a list ?
- Faraday 1.x.x compability HOT 2
- Deprecated warning on Faraday::Connection#basic_auth HOT 4
- 3.4.1 Causes 401: API Key Invalid HOT 7
- updating members in batching does not work HOT 1
- Gibbon doesn't work with Faraday 2.x HOT 4
- How to unsubscribe email that is bounced, pending, or archived? HOT 3
- v3.4.4 security patch for v3.4.0? HOT 1
- API Export 1.0 and API 2.0 will be retired on June 5, 2023 HOT 11
- Updating from 1.x: How to replace .lists.merge_var_add? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gibbon.