Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by playstel.studio@gmail.com · Nov 15, 2021 at 01:47 PM · CloudScript

Cloud Scripts Not Authorized error

I have "Not Authorized" in OnCloudScriptError after installing and setup GitHub in add-ons.
I can't edit cloud scripts from automation/revision (seems is not available now). Also i tried to use Azure Functions & VS Code, but it is inconvenient to test - it has a strict deploy iterations limits and long loading time of the scripts into the cloud app.

So I would like to know how to fix the authorization error...

        public void CloudScriptTest()
        {
            PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest()
            {
                FunctionName = "helloWorld",

		//I know that it is not necessary to specify the bottom lines, but I tri		ed it in different ways:
                GeneratePlayStreamEvent = true,
                RevisionSelection = CloudScriptRevisionOption.Live,
                AuthenticationContext = new PlayFabAuthenticationContext()
                {
                    PlayFabId = playerPlayFabID,
                    EntityToken = entityToken,
                    ClientSessionTicket = sessionTicket
                },
                FunctionParameter = args

            }, OnCloudScript, OnCloudScriptError);

        }
Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by SethDu · Nov 16, 2021 at 06:23 AM

@playstel.studio@gmail.com

@vrsde

,@Alejandro Requena Diaz, @ayoub alaoui kadiri, @arflact.

For this Cloud Script Authorized error, as well as the Photon room creation error, the root cause is the deprecation of Cloud Script.

As the blog Announcing CloudScript using Azure Functions is now GA (playfab.com) mentioned, Azure Function is now GA and it is a replacement solution of Cloud Script. CloudScript classic will remain available for titles that are already using it. Using it means they should have their own revision of CloudScript. New titles, or titles considered as low use of Cloud Script, won't be able to use Cloud Script classic any longer.

If you have been using Cloud Script for a while and it is disabled by mistake, and you are in a paid subscription plan, please submit a support ticket to us.

-----

Photon

If you follow PlayFab official tutorial or Photon official PlayFab integration document to implement webhooks, there will be errors because this tutorial requires Cloud Script functions, and if your title is disabled with this feature, you are not able to use Photon. The first event is Room Create, and it is the reason you get errors when creating room and even you have passed this event, the rest of events will also throw errors. Currently there aren't any official updated documents about implementing Photon with Playfab. I will try to reach the team to discuss this issue. For now, you will need to follow Photon documentation Webhooks | Photon Engine and official repositoryPhotonEngine/photon.realtime.webhooks.serverless (github.com) to implement it with Azure Function. This is not integrated with PlayFab and will need extra efforts to make it work.

Comment
playstel.studio@gmail.com

People who like this

1 Show 3 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image playstel.studio@gmail.com · Nov 16, 2021 at 09:05 AM 0
Share

Thanks! In this case in Azure I reach the limit in "Storage, Files, LERS Write Operations" (1,25 / 1 (10K)) after ~10 function deploy iterations from VS Code (this function is small and consists of a single script and Azure libraries connected to it).

How is it possible to conduct further testing that requires dozens of iterations? What happens if I don't pay attention to exceeding this limit and continue to use the free service?

avatar image Jay Zuo ♦ playstel.studio@gmail.com · Nov 17, 2021 at 07:57 AM 1
Share

How did you implement your Azure Functions? Are you using the above sample? Please note the above sample also uses Azure Blob & TableStorage and Notification Hub, which might be not needed for you.

avatar image SethDu ♦ playstel.studio@gmail.com · Nov 17, 2021 at 08:00 AM 1
Share

Please contact Azure support for billing issues.

avatar image

Answer by Yauheni · Nov 23, 2021 at 01:29 AM

Hi @SethDu

Maybe you can help me?

I still have a problem integrating Playfab and Photon into Unity. After successfully logging into PlayFab, I am trying to create a room using the CreateRoom command in Photon. Returns an error: Failed to create game at https: //......./RoomCreated? : Error response ResultCode = '1' Message = 'Not authorized'.

Maybe there is a solution for this problem?

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    10 People are following this question.

    avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

    Related Questions

    Photon Webhook url config 1 Answer

    How to deserialize a cloudscript server call back to the client? 2 Answers

    Cloudscript limits? | Can I link two frictionless logins? 1 Answer

    Http request call timeouts 1 Answer

    Alternative way of implementing energy restoration logic 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges