Jump to content
Vanar

Authorization to the firebase's https://iid.googleapis.com/iid/v1:batchImport

Recommended Posts

I always received FDeviceToken from the request https://iid.googleapis.com/iid/v1:batchImport


HTTP HEADERS: 
    Content-Type: application/json 
    Authorization: key=YOUR_SERVER_KEY 
BODY: 
    { 
    "application": "com.company.app", 
        "sandbox":true, 
        "apns_tokens":[ "7c6811bfa1e89c739c5862122aa7ab68fc4972dea7372242f74276a5326f...." ] 
        } 

 

Answer: 
        { "results": 
        [ { 
          "registration_token": "ejXQlECjCeI:APA91bE7oaUhaFnGyl77lFrySdEaWxocM0oj81uNezACX1wsZXiTyL4OYo5ssvFjjWYpFymMVyqBccboVcwTTW2rvykOmV_CABDM7rTIRCiJFl_9ngf7SrDSYoFouwNj69JSwlH.....",
                  "apns_token": "7c6811bfa1e89c739c5862122aa7ab68fc4972dea7372242f74276a5326f....",
                  "status": "OK"
                  }
                ]
        }

 

But recently this request stopped working (authorization required).

I get the answer:
    { "error": "Not authenticated or unauthorized"}

 

How to solve this problem?
How to rewrite the query?

 

Most likely it is related to this

5413367030758891349.thumb.jpg.a6547273a8370f991aa7a7de1ae21c60.jpg

Share this post


Link to post
On 10/14/2024 at 9:37 PM, Dave Nottage said:

See this documentation. Authorization is now via an OAuth2 token - there is a link in the documentation to details about methods for obtaining the token. 

Dave,
I'm trying Kastri now. Again 🙂

One thing I must do is download a copy of firebase.zip (SDK for iOS) from github. But both 11.2.0 as 11.3.0 give me an error when I try to unzip them: Invalid Zip-file. Tried on both win10 and win11.
I tried to ask a question in the issues section of this github-repo, but my question does not appear in the discussion. Dunno why, no error reported.
So I'm trying here: do you know an alternative to download this firebase.zip?
Thanks,

John

 

Share this post


Link to post
36 minutes ago, John van de Waeter said:

So I'm trying here: do you know an alternative to download this firebase.zip?

There's this link at this page, however it might just be a redirect to the latest version (11.3.0)

 

I notice a huge difference in size between 11.2.0 and 11.3.0 - 319MB vs 612MB!!

Share this post


Link to post
6 hours ago, John van de Waeter said:

Yep, lots of other code in this file. But it contains the original firebase.zip, which in turn has the same problem....

Both unzip OK on macOS, so I tried to "re-zip" the 11.2.0 version on Windows, but that causes Explorer to crash 😞

 

I've asked a question about it in their Slack workspace, since all the other reporting mechanisms don't seem to cover this category.

Share this post


Link to post
On 10/14/2024 at 5:28 PM, John van de Waeter said:

Hi Vanar,
I'm facing the same problem... did you find a solution?

cheers, John

 

Hi, John
I didn't find a normal solution
I temporarily solved the problem like this:
They give me a ready-made authorization key: ya29.c.c0ASRK0Ga_4Z1QIYsqufOCVdT ...., created on the server using PHP
And I slip it into my request ...

Share this post


Link to post
12 minutes ago, Vanar said:

Hi, John
I didn't find a normal solution
I temporarily solved the problem like this:
They give me a ready-made authorization key: ya29.c.c0ASRK0Ga_4Z1QIYsqufOCVdT ...., created on the server using PHP
And I slip it into my request ...

Lol....
I too had a hard fight to send those notifications to the v1-google fcm server.... I never realized that the converting part (apns->fcm) also required this new approach...


Having apps online that suddenly don't receive pn's anymore forces one to be creative....

I'm now trying the Kastri-path.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×