Why is this method using a callback? It's not asynchronous. Shouldn't it just return the apiUrl to the caller?