question

Pranil GC avatar image
Pranil GC asked

Developer secret key must be set to call Admin API call

So I am making a WebGL build and I have put the Developer secret key in the PlayfabSharedSettings Class that you generate from the toolbar.But when i Run the game in the browser in developer mode (WebGL).It gives me a error "Developer secret key must be set to call Admin API call" even though i have already put the developer secret key in the settings.

Player Data
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

·
Sarah Zhang avatar image
Sarah Zhang answered

Could you please clarify whether you are developing a client-side logic or a server-side logic? It looks like you are developing the client-side logic using Unity, is it right? If so, since the Developer Secret Key will give the caller all access of Server API and Admin API, we suggest you don’t add the Developer Secret Key to the clients to prevent the security issues. In principle, the Developer Secret Key should only be assigned to the servers or the administrative tools that authorized by the title developers. If you met this issue when you developed the server-side logic or the administrative tool, could you please provide more details for our troubleshooting? For example, do you use Unity to develop the project? If so, have you imported the PlayFab extension to the Unity project? How you configured the PlayFab extension? And could you please provide the specific code snippet that caused the error and the detailed reproduce steps?

4 comments
10 |1200

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

Pranil GC avatar image Pranil GC commented ·

So i am making the app ( Client side ) with unity in one unity project.

And in another one i am developing a ( Dashboard ) using WebGL unity in a different unity project that gets all the user information and that needs Admin API.

0 Likes 0 ·
Pranil GC avatar image Pranil GC commented ·

How can you configure the playfab extension ?

0 Likes 0 ·
Pranil GC avatar image Pranil GC Pranil GC commented ·

Is playfab extension different from playfab SDK. I have already configured the Playfab SDK.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Pranil GC commented ·

Thanks for clarification. And yes, PlayFab Unity SDK could work without PlayFab extension, if you added the extension to your project, the Develop Secret Key will be added automatically after you choose your TitleID and enable the Server API.

You can open the Unity project, then navigate to PlayFab EdEx window, click the tab [SETTINGS]->[PROJECT] to jump to the Title configuration page, you can choose your title in this page, and you can click the tab [SETTINGS]->[API] to jump to the API configuration page and you can enable the access of Server API in this page.

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.