This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Introduction to Twitter's API Forum

View Course » View Exercise

932 points
Dd44282b013732242e8508c3c7e66c1f?s=140&d=retro
Submitted by
lkilian
almost 4 years ago

Certificate verify failed

Hi,

I thought I did everything as asked and added the generated keys and secrets in place of the placeholders "YOUR CONSUMER_KEY" etc.

consumer_key = OAuth::Consumer.new(
        "YOUR_CONSUMER_KEY",
        "YOUR_CONSUMER_SECRET")
access_token = OAuth::Token.new(
        "YOUR_ACCESS_TOKEN",
        "YOUR_ACCESS_SECRET")

But whenever I run it, I get the response:

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

What might be wrong? Do I have to change something else within the script?


11 votes

permalink

I had to change VERIFYPEER to VERIFYNONE for it to work.

151 points
84baff334b0f2066821a9392241e5173?s=140&d=retro
Submitted by
Piaso B
almost 4 years ago

5 Comments

Dd44282b013732242e8508c3c7e66c1f?s=140&d=retro lkilian almost 4 years ago

Thanks. That works for me as well.

89194c675ab57ccb369235e85afab805?s=140&d=retro Janelle Hinds almost 4 years ago

Did you get a 401 error?

512da13d22cc05c3b30073d2_893580913 Sanket Patel almost 4 years ago

What is the purpose of VERIFYPEER, how does it work?
Why setting it to VERIFY
NONE made this work?

5e9b47c973ad74b94b1b445956d4cdc5?s=140&d=retro courseRockstar68051 almost 4 years ago

I second that.

51b76346631fe907fc00d3bf_976929824 Angeliki-Iro Fragkou-Argyriou almost 4 years ago

thanks :)


1 vote

permalink

Just wanted to bump this because changing VERIFYPEER to VERIFYNONE worked for me also. Would like to know what the difference is, and/or, at the very least why this works to get around the error posted by the OP.

646 points
93c6b3d0a4e3a973c4c377c5d3834838?s=140&d=retro
Submitted by
Matt Mazur
almost 4 years ago


1 vote

permalink

Bumping this. Apparently an API change leaves this exercise still broken, but the fix posted above worked for me

1148 points
152d549d177ca0e7de5d65093de443a2?s=140&d=retro
Submitted by
John Ireton
almost 4 years ago


0 votes

permalink

I'm getting the same error. Twitter changed their API this week, but I'm not sure if that's what is causing this problem. Hopefully someone who knows can chime in.

https://dev.twitter.com/discussions/24239

1185 points
8ea2e07aef1fd8050c4d9f6f06f4c577?s=140&d=retro
Submitted by
driveshaftbassist
almost 4 years ago