This is a network issue. You can first check if the API URL is accessible using the code in this thread.