set the locale when getting a token from the API + avoid exceptions if the default_source_url is not correctly set