I've implemented a token endpoint which is working as expected from the js sdk, but when I try to use it from the dotnet/unity sdk like this:
_ablyRealtime = new(new ClientOptions
{
AuthUrl = new Uri("https://{auth url}"),
UseTokenAuth = true,
AutomaticNetworkStateMonitoring = false,
CustomContext = SynchronizationContext.Current,
AutoConnect = false,
});
I am unable to connect and always get the unhelpful error message:
[ErrorInfo Reason: Error executing request. Invalid token request body; timestamp must be string or number (See https://help.ably.io/error/40001); Code: 40001; StatusCode: 400 (BadRequest); Href: https://help.ably.io/error/40001]
Using the API key directly works, but as you've stated yourself in this article, it is a really bad idea to embed the api key in the app. How can I fix this?
Tested in both Unity 2022.3.42f and Unity 6000.0.23f, Ably sdk 1.2.15
┆Issue is synchronized with this Jira Task by Unito
I've implemented a token endpoint which is working as expected from the js sdk, but when I try to use it from the dotnet/unity sdk like this:
I am unable to connect and always get the unhelpful error message:
Using the API key directly works, but as you've stated yourself in this article, it is a really bad idea to embed the api key in the app. How can I fix this?
Tested in both Unity 2022.3.42f and Unity 6000.0.23f, Ably sdk 1.2.15
┆Issue is synchronized with this Jira Task by Unito