Encode appId before using it in the URL for requests