SeaDream Logo

SeaDream Developer Site

Authentication

You need to get a username and a password to use the API. If you do not have access credentials, please complete a quick signup form. For version 1 of the API we use basic authentication which by design is not secure (at least not using http). No data provided by our API is considered sensitive so this should not be a big issue. In future versions the authentication will leverage OAuth


Using cURL you can test authentication towards our API using a command such as

curl -u username:password http://api.seadream.com/v1/voyages

A successful response will look something like this


HTTP/1.1 200 OK
Date: Tue, 11 Nov 2014 21:54:25 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.5
Cache-Control: no-cache
Set-Cookie: session=eyJpNjhjM ... M2Y3YTk3N; expires=Tue, 11-Nov-2014 23:54:25 GMT; Max-Age=7200; path=/; httponly
Content-Type: application/json

(followed by the json formatted data)

Whereas an unsuccessful request will return a 401 error such as this


HTTP/1.1 401 Unauthorized
Date: Tue, 11 Nov 2014 21:57:28 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.5
WWW-Authenticate: Basic
Cache-Control: no-cache
Set-Cookie: session=eyJpNjhjM ... M2Y3YTk3N; expires=Tue, 11-Nov-2014 23:57:29 GMT; Max-Age=7200; path=/; httponly
Content-Type: text/html; charset=UTF-8

Next: versioning