问题在GCM注册程序程序、问题、GCM

由网友(蜡笔没了小新)分享简介:我下面这个教程教程启用推送通知在我的Andr​​oid应用程序。我已经创建了GCM的用户帐户,然后通过切换按钮创建一个新的项目,使GCM服务。现在,我必须得到我的API密钥。下面的教程的指示,我应该去:I following this tutorial tutorial to enable push notifica...

我下面这个教程教程启用推送通知在我的Andr​​oid应用程序。我已经创建了GCM的用户帐户,然后通过切换按钮创建一个新的项目,使GCM服务。现在,我必须得到我的API密钥。下面的教程的指示,我应该去:

I following this tutorial tutorial to enable push notification in my android app. I've already created an user account in GCM then created a new project, enabled GCM service by toggling ON the button. Now I have to obtain my API key. Following the instructions of tutorial I should have to go:

在左侧,选择原料药及放侧边栏; AUTH>注册应用程序。 点击注册程序。

In the sidebar on the left, select APIs & auth > Registered apps. Click Register app.

但是,有没有注册的应用程序。你能解释一下我该怎么做?

But there is no Registered apps there. Could you explain me how to do that?

感谢

推荐答案

我一直在试图创建PHP服务器基于服务的实例。 我需要一个客户端ID和一个私钥文件。我没有必要的API密钥,但是我会解释我是如何得到这一点。

I've been attempting to create an instance of the php server based service. I needed a client ID and a private key file. I haven't needed api key yet, but I'll explain how I got that too.

要来自你在哪里现在看来,你需要做的获得这些:

To obtain these from where you are now it appears you need to do this:

走进API和验证>证书

Go into APIs and Auth > Credentials

在OAuth的点击创建新的客户ID和使用的服务帐户选项。这将提供访问JSON文件和私钥文件。他们俩下载到地方在您的本地项目。 JSON文件包含了除其他事项外客户端密钥。私钥是它在锡说。

Under OAuth click CREATE NEW CLIENT ID and use the service account option. This will provide access to a JSON file and private key file. Download them both to somewhere in your local project. The JSON file contains a client key among other things. The private key is what it says on the tin.

此外,你可以得到的都是这种API密钥:

Furthermore, you can obtain an API key in this way:

在公共API访问单击创建新的键,然后选择您的选项。 (在我来说,我试图通过PHP连接,所以我选择了服务器密钥)。我使用0.0.0.0/32,使任何IP - 不是很安全,但我只是原型在这一点

希望这有助于...

阅读全文

相关推荐

最新文章