question

Jeremey Zela avatar image
Jeremey Zela asked

GetEntityToken Periodically Receiving 401 Error in Timer Azure Function

Hi,

We have a very simple azure function running on a timer that performs various operations in PlayFab throughout the day. It works 90% of the time, however on occasion it will receive a 401 error and fail out. Typically when it receives a 401 error it will do this consistently for a couple of hours and then seemingly correct itself.

The code is very simple:

 PlayFabSettings.staticSettings.TitleId = Utils.GetPlayFabTitleId();
 PlayFabSettings.staticSettings.DeveloperSecretKey = Utils.GetPlayFabDevSecretKey();
 var getTitleEntityTokenRequest = new GetEntityTokenRequest();
 var titleEntityResponse = await PlayFabAuthenticationAPI.GetEntityTokenAsync(getTitleEntityTokenRequest);

Please advise. Thank you!

Authentication
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

·
Neils Shi avatar image
Neils Shi answered

Could you tell us why you need to run the function you provided all day on the timer? And the 401 error typically indicates an “Unauthorized” request, you can provide us with complete error message so that we can so some research.

10 |1200

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

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.