cancel
Showing results for 
Search instead for 
Did you mean: 

Failed. The API key entered may be invalid.

Former Member
0 Kudos

Hi

I have generated Google API Browser key and Server Key via link:

https://cloud.google.com/console/project/apps~third-strategy-476

and pasted as indicated below

For Google Enrollment: Copy the Browser API key and paste it into the Afaria 7 sp4 -> Server -> Configuration -> Server -> Enrollment Code ->

Under Google API Key.

when I click the Test Google URL connection it shows a message as "Failed. The API key entered may be invalid."

I have also pasted the server API key For GCM Server

Copy the Server API key and Project ID into the Afaria 7 SP4 -> Server -> Configuration -> Component -> GCM Server.

Now I have enrolled the Samsung Tablet using tiny URL code successfully getting the app on the device.

However my enrollment code still I am not able to enable Google URL service, what is the impact?

and How can I resolve this issue?

Note: I have created a Android Channel and published.

could anyone assist on this please?

Regards,

Saravanan.R

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

You need to check the internet connection first if its from proxy you need to config the same.

You need to config the PROXYCONFIG.exe which is located at the bin folder of c:/programfilex86\afaria.

Also make sure all the ports are open .

Access to url for GCM port 443 , 5228-5230

Former Member
0 Kudos

Hi Mithun/Chetan,

1) I have logged in gcm through below link and with my gmail credentials,

I have got the Google Developers Console and able to see my project list on the page

https://cloud.google.com/console/project

2) on clicking the the project name link it allow me to a next page and find the APIs& auth link

APIs & auth>>APIs following options are on

Google Cloud Messaging for Android

Google Cloud SQL, Google Cloud Storage JSON API

URL Shortner API

3) APIs & auth>>Credentials

Key for browser applications

Generate a API key and enter my afaria server's Public IP

4) APIs & auth>>Key for server applications

Generate a API key and enter my afaria server's Public IP

5) copy& paste the browser key into

Afaria admin UI>>Server>Enrollment server

Enable Google URL services and pasted Browser API key as value for API key.

Note: All ports are already opened in my Afaria server. I am not using proxi server (proxi is disabled in my connections)

still I 'm getting the same error as (Failed,The API key entered may be invalid.)

Is there anything I have missed out here? kindly highlight

Regards,

Saravanan.R

Former Member
0 Kudos

Hi,

did anyone come across the same issue?

Any inputs are greatly appreciated.

Regards,

Saravanan.R

Answers (6)

Answers (6)

Former Member
0 Kudos

Hello Saravanan,

Please look into this SCN thread http://scn.sap.com/thread/3286886 hope this help you to resolve the issue.

Cheers,
Sushmitha

former_member686053
Active Participant
0 Kudos

I solved my case. Bec. of my service account's windows profile has IE proxy settings.

Former Member
0 Kudos

Hi Tevfik

I am having the same issue. please advise how you resolved this issue. what is "Bec. of windows service account account profile"?

Please assist

jtaylor
Active Participant
0 Kudos

What he meant is that the service account, under which Afaria's services are running, has a proxy defined in it's internet settings. One possible way to resolve that is to sign in as the service account user on the server, and assure that it is unchecked. I believe it is also possible to change through the registry, but am not sure of the method.

former_member686053
Active Participant
0 Kudos

I trace packets by using wireshark while test tinyurl  and see that there is no packet that goes  from afaria server to Tinyurl.

Or Google.

But I working afaria server I can catch those packets.

I thik it is a clue.

keith_nunn
Active Participant
0 Kudos

Hi, Tevfik.

If you used ProxyConfig.exe to configure proxy settings then traffic will be sent to the address:port stored in the HKLM\Software\Afaria\Afaria\Server\Proxy key.  If you don't see traffic out to https://android.googleapis.com then check for traffic out to your proxy server's address and port instead.

Thanks,

Keith Nunn
SAP Active Global Support
SAP Canada

former_member686053
Active Participant
0 Kudos

There is no Proxy key on registry bec. of I dont use.

As I told before, My other Afaria Server can reach GCM and Google URL.

Old and new afaria servers are on same firewall rules. Relays as well.

So I think there is  no  firewall rulw issue. No prox issue.

former_member686053
Active Participant
0 Kudos

Hi,

In my API project, seems same. I mean I can see that "Any IP allowed"

Let me describe what is my problem exactly.

I try to install new Afaria Server. I install Afaria Server and Relay Server and RSOE2 works .

But,

During configuration, I cant test TinyURL and Google URL server.

WHat I did?

I use server key for GCM Server

And I use browser key for Google URL server.

What is your idea about this issue?

Former Member
0 Kudos

Hi Tevfik, Enter the API key in the Afaria server configuration under GCM server and Enrollment code options. If you are using a proxy server perform a telnet on proxy for: telnet android.googleapis.com 443 Thanks, Tushar

former_member686053
Active Participant
0 Kudos

cant connect to android.googleapis.com  from port 443 by using telnet.

As I told before, In wireshark packet analysis , there is no packet goes to aoutside from afaria

Former Member
0 Kudos

Hi All,

As the GCM push notification service is used in SAP Afaria and we have to allow the ports 5228:5230 outbound, what block of the IP range need to be allowed from the firewall to send a error free notification ?

Thanks,

Tushar

former_member686053
Active Participant
0 Kudos

I did same steps.  And I open all firewall ports for Afaria and Relay's inbound and outbound  traffic for testing.

But neither tinyurl nor google  now work

Any idea?

Former Member
0 Kudos

Hello Tevfik,

Could you please share the Afaria server message logs for the GCM errors (ONS error). Also please check the gcm server address in the server configuration page:

https://android.googleapis.com/gcm/send

Also please verify your settings for the API key,

Regards,

Tushar

midhun_vp
Active Contributor
0 Kudos

The steps you are doing may be wrong, follow this document to get the API key and project ID, http://frontline.sybase.com/support/resolutionDetails.aspx?KBID=8103

After that for google enrollment: Copy the Browser API key and paste it into the Afaria 7> server>config>enrollment code>under google api key.

For GCM: Copy the server API key and project ID >server>config>component >gcm server.

You need to restart the afaria server and create new enrollment code to use it with GCM.

- Midhun VP