Finally got around CORS issue by switching api