Hi Ben,
Is it possible to enable CORS or JSONP on the API? That way we can
access the API via JavaScript.
JSONP would be sufficient, but then you'd have to allow sending of the
API-Key via GET. (Custom headers don't work with JSONP; Also POST
doesn't work with JSONP but that's no big issue I think).
If CORS were to be enabled, you wouldn't even need to adjust the API
(except for that one header you need to send to enable it), as it's then
possible to send the API-Key via a custom header. Above that POST
calls will work too :-)
To prevent theft of API-Keys (which won't be a biggie if people were to
develop somthing in JS), you'll preferably will want to lock a certain
API-Key to a certain domain. Perhaps this could be an option when
signing up for an API-Key: to enable cross-domain access on must
provide a domain where the app will run.
Regards,
Bram.