I need to get remote config in a trigger, specifically when a user creates an account and I need to initialize new account’s data which is stored in a remote config. However service token does not support remote config services and all attempts I have spent using rest apis has failed so far. They all return error “Invalid authorization header” even though I have created an authenticator in rest sharp using service token.
private readonly RestClient configRestClient;
configRestClient = new RestClient("https://services.api.unity.com/remote-config");
var request = new RestRequest($"v1/projects/{context.ProjectId}/configs/{RemoteConfigKey.PlayerDefaultData}")
{
Authenticator = new JwtAuthenticator(context.ServiceToken)
};
RestResponse response = await configRestClient.ExecuteGetAsync(request);
configRestClient = new RestClient("https://config.unity3d.com/api");
var request = new RestRequest($"v1/settings")
{
Authenticator = new JwtAuthenticator(context.ServiceToken)
};
request.AddQueryParameter("projectId", context.ProjectId);
RestResponse response = await configRestClient.ExecuteGetAsync(request);
this throw error “key is not listed in jwk store”
Hi @unity_E9F17C20E455E1AB3674,
Remote Config does not support the Cloud Code service token at this time: Service and access token support.
To use Remote Config within a Cloud Code C# module, you can refer to this quest system use case Quest system for an example (gameApiClient.RemoteConfigSettings.AssignSettingsGetAsync
)
Helllo! When will the option to read remote config using service account be available? Because it seems like it should be