Replaced the cosm api with the xively api. This gives SSL errors because they're delivering the cert for api.xively.com at api.cosm.com *sigh*