I have created a private bucket,
For test, I get the Bucket Access Tokens: d107a7014d8de3b5d410ef902607b335,
After reading the documentation, I realized that I need to authenticate the token in the form “username:password” and the username needs to be empty.
So I use “:5675c7320b732302c5e08ed0e81c508a”
Then got base64-encoded: “OjU2NzVjNzMyMGI3MzIzMDJjNWUwOGVkMGU4MWM1MDhh”
Finally I executed the following code:
Addressables.WebRequestOverride = webRequest =>
{
webRequest.SetRequestHeader("Authorization", "OjU2NzVjNzMyMGI3MzIzMDJjNWUwOGVkMGU4MWM1MDhh");
Debug.Log($"Fetching: {webRequest.url}");
};
handle = Addressables.LoadAssetAsync<AudioClip>(auName);
Got the error:rage:
RemoteProviderException : Unable to load asset bundle from : https://7f946db4-cb70-4bb2-9159-8c7bafcc3e6b.client-api.unity3dusercontent.com/client_api/v1/environments/production/buckets/abf736f6-987e-4b9c-b42a-badedfe13339/release_by_badge/latest/entry_by_path/content/?path=/skydancer_assets_all_3765caabd9a123364042eef62f516ce8.bundle
UnityWebRequest result : ProtocolError : HTTP/1.1 401 Unauthorized