question

jordangrant-hall avatar image
jordangrant-hall asked

Invoke a forbidden host issue

Hi there, I followed the entire tutorial on your website to create a Azure Function. When I get to actually calling the function from unity. It gives me this.

/CloudScript/ExecuteFunction: Cloud script function HttpExample attempted to invoke a forbidden host

I've made sure the Azure function is registered. I've made sure my Azure portal has it in my Function App.

But I do have a question regarding whether or not it's a problem, that my Azure Portal account and my Playfab account are different. And whether or not that'll cause a problem?

apis
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 can refer to Debugging CloudScript using Azure Functions in the Azure portal - PlayFab | Microsoft Learn to check Log Stream in the Azure portal to see if the function is executed and if any error messages are displayed. And you may double check the Function URL in the PlayFab Edit Cloud Script Function page to see if it is correct. Additionally, we recommend that you follow the documentation: Local debugging for Cloudscript using Azure Functions - PlayFab | Microsoft Learn to debug your Function locally before deploying it.

2 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.

jordangrant-hall avatar image jordangrant-hall commented ·

This didn't help. I spent 4 hours going through all the documentation before writing this :D

1 Like 1 ·
Xiao Zha avatar image Xiao Zha jordangrant-hall commented ·

I reproduced your issue by registering the function in PlayFab using the URL generated when testing the function locally (something like this: http://localhost:7071/api/Test). This URL is only suitable for local testing. If you use the similar URL and want to test the deployed Function, you can refer to the Create your first function in the Azure portal | Microsoft Learn to copy the URL of the deployed function and use it to register the function in PlayFab.

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.