• Announcements

    • Shane D.

      Announcing 'Spaces' for Evernote Business!   02/27/2018

      Hi All, We're very excited to announce the launch of Spaces for Evernote Business! I invite you to find more details and learn more in our most recent Community Announcement! 
    • Shane D.

      Code of Conduct   03/26/2018

      Hi All, The updated version of the Code of Conduct has been implemented, and you will need to accept those terms before proceeding. If you would like to review the Code of Conduct, you can do so Here
    • Shane D.

      Update to Evernote Subscription Plans   04/12/2018

      Hi All, We've made some updates to our Evernote subscription plans. To learn more, please see the 'Update to Evernote Subscription Plans' thread in the Community Announcements forum, or you can go here.

Recommended Posts

Hi all,

I'm trying the PHP single authentication example, and I'm getting the following error:

Fatal error: Uncaught exception 'TTransportException' with message 'THttpClient: Could not connect to sandbox.evernote.com:443/edam/user' in /opt/www/path/web/site/transport/THttpClient.php:196 Stack trace: #0 /opt/www/path/web/site/packages/UserStore/UserStore.php(55): THttpClient->flush() #1 /opt/www/path/web/site/packages/UserStore/UserStore.php(35): UserStoreClient->send_checkVersion('PHP EDAMTest', 1, 21) #2 /opt/www/path/web/site/index.php(62): UserStoreClient->checkVersion('PHP EDAMTest', 1, 21) #3 {main} thrown in /opt/www/path/web/site/transport/THttpClient.php on line 196

I've doublechecked the credentials and they seem correct.

I have no clue what could be the reason.

Perhaps because I'm running the script from the browser and not from the console?

Any idea's are welcome.

Thank you.


running it from the console works.

How can I make it run from the browser?


Edited by vampie

Share this post

Link to post

That's a networking error (Thrift's TTransportException thrown by the HTTP client), so you're having a problem connecting to our sandbox server. Since it works when you run the script from the command line, I'm assuming that there's some difference in the PHP environment when you run in the browser (presumably via Apache). The most common problem is the SSL configuration of your server - our script is making an outbound HTTPS request, and it may be the case that your SSL client environment isn't trusting our server certificate.

Share this post

Link to post

Thank you for the answer.

So I'm gonne have to check with my host then?

and it may be the case that your SSL client environment isn't trusting our server certificate.

What do you mean with SSL environment?

Is that my browser or is that the apache server?

thank you

Share this post

Link to post


I've changes this:

$evernoteHost = "sandbox.evernote.com";
$evernotePort = "443";
$evernoteScheme = "https";

to that:

$evernoteHost = "sandbox.evernote.com";
$evernotePort = "80";
$evernoteScheme = "http";

And I get the same error:

THttpClient: Could not connect to sandbox.evernote.com/edam/user

:( :( :( :(

Share this post

Link to post

Ok, so it's not an SSL problem. Can you make an outbound connection to sandbox at all from that host? E.g., curl from the command line?

Share this post

Link to post


a curl works perfectly even from the site:

I've created a test.php and this shows the index page.

// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "https://sandbox.evernote.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
// close cURL resource, and free up system resources

Share this post

Link to post

I solved the problem:

the setting "allow_url_fopen" was not enabled.

I enabled this for my subdomain and it worked immediately :-)

  • Like 1

Share this post

Link to post