use variable api url and fallback to fixed url for external integration