question

Sebastian Angermann avatar image
Sebastian Angermann asked

How to set DeveloperSecretKey on a C# console server?

I'm using a C# networking solution (DarkRift2) as a standalone console server for my unity project. But when I try to use some one the API request, I get this "DeveloperSecretKey must be set in your local or global settings" error if i just set the key directly in the code like this:

PlayFabApiSettings apiSettings = new PlayFabApiSettings {DeveloperSecretKey = "myKey"};

I somewhere read those kind of settings have to be declared in he app.config, which I tried to, using the ConfigurationManager class, but i still get the same error.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

You may try this code:

PlayFabSettings.staticSettings.DeveloperSecretKey = "Your DeveloperSecretKey "

. If it doesn’t work, can you provide us the relevant code for further research.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sebastian Angermann avatar image Sebastian Angermann commented ·

It worked. Thanks.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.