Firebase messaging keys differences - google-cloud-messaging

I'm with a worry about the key of firebase messaging service, right now I got an error HTTP 401, and my surprise when I check the key, it is different than the key that I got at "Cloud Messaging" tab in google firebase console, however if I download the json file that I should put inside my app, the tag current_key doesn't match the key at "Cloud Messaging" tab, but matches with my key.
So I should ignore the json file downloaded from console and replace the current_key tag in my configuration file with the key that I can find at "Cloud Messaging" tab?

They current_key value in google-services.json is not used by the firebase-messaging library but by other firebase libraries.
To send messages your server should use the API-KEY present in settings > "Cloud Messaging"

Related

Evernote dev: How can I see a list of apps/tokens and get my consumer key(s)?

I can't see anywhere on https://dev.evernote.com/ where I can find:
a list of apps on this developer account
a list of the developer tokens and secret keys
Also, different parts of the docs refer to "consumerKey" and "API key", is this the same thing?
As for the developer token, you can request enabling it for your production account by submitting a support ticket. I believe API key usually means consumer key and secret, and I don't think Evernote has a page to list consumer keys you've created.

GCM / FCM: "Received ANDROID API key. Only SERVER API keys are accepted."

I'm trying to authenticate with google's FCM (formerly GCM) - and getting the following error message:
Received ANDROID API key. Only SERVER API keys are accepted.
I am providing FCM with an API key - which I got when I downloaded my service's "google_services.json".
perhaps its the wrong api key?
and so it took a little while, but I found the answer: I was using the wrong key. the "server key" is shown in the UI (and not in the json file you download - which (I guess) is just for clients): settings->cloud messaging. its confusing, so I got confused.
(perhaps the folks in Google could rename the api key in the file to something like "client_api_key"?)

AngularFire 2.0.1 $createUserWithEmailAndPassword auth/invalid-api-key

I am trying to create a Firebase user from AngularFire 2.0.1 (Firebase 3.0.5) using:
$createUserWithEmailAndPassword(email, password)
The api returns an error:
{"code":"auth/invalid-api-key",
"message":"Your API key is invalid, please check you have copied it correctly."}
The config for the app looks like this:
{apiKey: "my_verified_key",
authDomain: "my_verified_project_id.firebaseapp.com",
databaseURL: "https://my_verified_project_id.firebaseio.com/"}
where my_verified_key is the database secret found at
https://console.firebase.google.com/project/my_app/settings/database
my_verified_project_id is the ProjectId found at
https://console.firebase.google.com/iam-admin/settings/project?project=my_verified_project_id&consoleReturnUrl=https:%2F%2Fconsole.firebase.google.com%2Fproject%2Fmy_verified_project_id%2Fsettings%2Fgeneral%2F
In the network log I see that the error comes from a POST to
https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=my_verified_key
I have checked that identity toolkit api is enabled for my app.
I've tried disabling/enabling email/password authentication in the Firebase control panel as suggested elsewhere.
I have tried to create the user from the node library but it seems that most of the auth functionality is not implemented there.
Make sure you are getting the correct API Key. Go to the firebase console page:
https://firebase.corp.google.com/project//authentication/users
Click WEB SETUP on the top right corner:
The snippet provided will contain the auto generated api key for you to user.

Get authorization for IP to use an API key

I refer to a answer given by Mike20132013 on
This IP, site or mobile application is not authorized to use this API key.
Mike in point 5 you say:
Once you are done, click create and your new Server Key will be generated and you can then add that server key to your URL.
Sorry, I am lost here. I have created a server key but to which URL are you referring to? Where exactly do I enter this URL please? I have bought the Google Reviews Plugin and I get the error message
"REQUEST_DENIED: This IP, site or mobile application is not authorized to use this API key. Request received from IP address 46.249.199.28, with empty referer" on my website.
My host has referred me to your answer.
Then you say
"Last thing is that, instead of putting the sensor=true in the middle of the URL, you can add it in the end like this:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=yourlatitude,yourlongitude&radius=5000&key=SERVERKEY&sensor=true"
I have no idea where to input this.
Easy part first: just omit the sensor parameter entirely. As the documentation says:
The Google Places API previously required that you include the sensor parameter to indicate whether your application used a sensor to determine the user's location. This parameter is no longer required.
For the REQUEST_DENIED error, please go to the Google Developers Console and ensure that:
you are using a Server key, not a Browser key or similar.
you have the Google Places API Web Service enabled (rather than e.g. Google Places API for Android).
your Server key either has a blank field for the IP addresses that may use it, or that the IP addresses field matches your IP (46.249.199.28).
The Get a Key part of the Google Places API Web Service documentation walks you through creating an appropriately configured API key.

Google Maps: "This API project is not authorized to use this API."

Recently I started coding a Google Maps service integration. I went ahead and generated an API Key associated with my business email account on bronze level. When I use the service sans API Key everything works swimmingly.
If I use the API Key parameter, with my API key generated in my developer console I get the error message:
This API project is not authorized to use this API.
The URL used to access maps is below:
https://maps.googleapis.com/maps/api/distancematrix/xml?origins={origin_address}&destinations={destination_addresses}&mode=driving&language=en-US&sensor=false&key={APIKey}
How does one get the API Key to be authorized for v3 Maps JavaScript API. I am making the call as a raw post in the ASPX code behind to that address. It seems to me this used to work fine when I first started all this, now today all of the sudden I'm getting this error.
I need this to work since I will also be using places and that service seems to only work with the API Key. I would like to be able to have the key configured once and be done with it.
You'll need to enable each API you want to use.
The maps-javascript-API is one API, the DistanceMatrix-API(Webservice) another.
Go to the developer-console->API's and enable the Distance Matrix API
Note: this is only related to the DistanceMatrix-Webservice, when you use the DistanceMatrix-Service of the Javascript-API you don't need to enable this service.