18

I have problem in creating API Key because the options "create new server key" and "create new browser key " were not in the API access page. whether I should pay for using that.

Saravanapandi_PSP
  • 351
  • 1
  • 3
  • 11

5 Answers5

21

Normally after creating a project and saving a project # you click on Services on the left panel and turn on Google Cloud Messaging for Android. Then you should see this screen: enter image description here

Click on API Access and note down the API Key marked on the picture

enter image description here

EDIT: Here is the link to the full article that describes this process in details: http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/

Marcin S.
  • 11,476
  • 6
  • 45
  • 63
  • 7
    Why don't you give credits to actual author? Here is detailed article about [Android GCM](http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/) – Paresh Mayani Oct 31 '12 at 04:21
  • Yes, this is plagiarism. This is very bad form. If I had time I would overhaul this answer. – Bruno Bronosky Mar 10 '14 at 22:24
9

The screenshots previously posts provide a great visual, but here are the steps I've taken when setting it up:

Go to http://developer.android.com/guide/google/gcm/gs.html

1 - Login with a google account

2 - Click 'Create project...' if you have not already done so.

3 - When you get to a page with a left side nav, make sure 'Services' is selected

4 - Turn 'Google Cloud Messaging for Android' ON

5 - Click on the 'Google Cloud Messaging for Android' link

6 - Click on the 'API Access' link in the left nav

7 - You should now be able to create a new server or browser key by clicking the corresponding button

Shellum
  • 3,059
  • 2
  • 18
  • 26
  • Yay I setup all stuff but I forget to `Turn 'Google Cloud Messaging for Android' ON` – Cool Oct 20 '14 at 16:11
5

The easiest way is now login with your account on: https://developers.google.com/mobile/add and use wizard :)

mtrakal
  • 5,142
  • 1
  • 17
  • 31
2

First of all create Project in Google Console https://accounts.google.com/ServiceLogin?service=cloudconsole&passive=true&continue=https%3A%2F%2Fconsole.developers.google.com%2Fproject&ltmpl=cloudconsole

Create New Project and note down the Project Number

In the left pane under APIs & auth select APIs and enable Google Cloud Messaging for Android.

Then select Credentials section.

Create a new Key select type as Server key. Enter the IP of your server. If you are testing in localhost enter the IP as 0.0.0.0/0.

Note down the API Key

jabir jazz
  • 177
  • 1
  • 2
  • 10
1
  • Go to Google play console

  • Then click Create project and provide an ID for this application.

  • Then you can see the project name shown in the list.Enter into the project you were created earlier.

  • In the left side, Api&Auth ->Api.You have to turn on Google cloud messaging for android.

  • For me,I have to Click Credentials in Api&Auth to create a
    key.Below I am shown a screenshot for that.

    enter image description here

  • Finally,Click create new key to generate a key for your application.see here for SHA-1 fingerprint

Community
  • 1
  • 1
Steve
  • 9,114
  • 15
  • 82
  • 133