[Bug] Firebase Functions - GetHttpsCallable actually sends a POST request, should be renamed
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp, typescript, unity
- Domain
- backend-api-design, game-dev
Research direction
Review the GetHttpsCallable entry point in the C# file and the api.get/api.post routes shown in index.ts. Confirm the callable request behavior and identify the public method references that would need consistent naming. Done means the method name accurately reflects the POST-only behavior and the documented usage no longer suggests GET.
Written by the indexing model from the issue text.
Description
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2021.1.17f1
- Firebase Unity SDK version: 8.8.0
- Source you installed the SDK: .unitypackage
- Problematic Firebase Component: Functions
- Other Firebase Components in use: Auth, Firestore
- Additional SDKs you are using: N/A
- Platform you are using the Unity editor on: Windows
- Platform you are targeting: Android
- Scripting Runtime: IL2CPP
[REQUIRED] Please describe the issue here:
I am using Firebase Functions with Express routing set up, e.g. in my index.ts file (external to the Unity project):
api.get("/products", helloWorld);
When I call this route within my Unity project, using GetHttpsCallable in a C# file:
var func = _firebaseFunc.GetHttpsCallable("api/products");
It turns out a POST request is sent by default (using SmartSniff)

From reading about this (StackOverflow 1, 2) it seems this is intended behaviour - Firebase cloud functions indeed only accept POST requests: https://firebase.google.com/docs/functions/callable-reference
However, it would certainly solve a lot of headaches if the SDK method call did not begin with the word 'GET'. The only error message I was able to get was 'INTERNAL' in the Unity editor, or 'Not Valid JSON' when building to device, and as a result took some time to debug.
After creating a duplicate route with 'post' alongside my 'get' route, the call began to work as expected:
api.get("/products", helloWorld);
api.post("/products", helloWorld);
Steps to reproduce:
As above
Relevant Code:
As above
- Dominant language
- C#
- Stars
- 923
- Forks
- 456
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/quickstart-unity
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
firebase/quickstart-unity#1448 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
firebase/quickstart-unity#1432 · 1 comment ·
-
new
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
firebase/quickstart-unity#1411 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
firebase/quickstart-unity#1403 · 1 comment ·
-
Firebase or specific Android versions trigger app_clear_data on first_open, disrupting our funnel Opennew
Difficulty 4/5 3-5 days Newbie friendliness 25/100
firebase/quickstart-unity#1390 · 1 comment ·
All issues in firebase/quickstart-unity
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·