Search code examples
phpsslcurlstocktwits

Basic Stocktwits SSL


I have a simple question, excuse my ignorance. I read in the stocktwits documentation that: 'All requests must be SSL' for things such as

curl https://api.stocktwits.com/api/2/streams/home.json?access_token=

Now if I want to post a message, and I have an access token saved, can I use the following to post from a website that doesn't have a ssl certificate

curl -X POST https://api.stocktwits.com/api/2/messages/create.json?access_token= -d 'body=Creating a new message'

does that count as being over SSL, since the curl destination is to https? or does my website also need an SSL certificate as well, and the redirect url needs to be https?

I guess I am a little confused as to what over SSL means. Does it mean both the requester and the destination have to both have SSL certificates, or does it just mean the destination needs to be HTTPS

Thanks


Solution

  • Just the destination needs a certificate.

    "Over SSL" means the connection between machines has to be secured. Using cURL with an https-protocol request means the request will be secured. You could run this from a machine that isn't publicly-addressable at all ("behind the firewall"); requests to your machine are irrelevant here.