-1

I have:

  • a domain hosted outside google (englishcampus.com.br)
  • a VM instance in Google Compute Engine running an application, with a static IP
  • a subdomain (erp.englishcampus.com.br) pointing to that VM, which is working fine

But as I'm trying to authenticate Google API (OAuth), I get an error message:

"Invalid parameter value for redirect_uri: Raw IP addresses not allowed: http://104.197.50.68:8069/google_account/authentication"

...showing that one cannot use an IP address to redirect. On the API credential I put "http://erp.englishcampus.com.br/google_account/authentication", assuming that erp.englishcampus.com.br points to the VM.

My question is: how can I have the VM responding under an URL, instead of the static IP address, so that the OAuth process work?

Atila Tini
  • 21
  • 3
  • 1
    This question is being voted for closure because the author does not show a level of technical understanding or appropriate due diligence in researching the topic that the community judges as being a minimum barrier to participate. – Wesley Oct 01 '15 at 02:26

1 Answers1

2

Give the VM an A record for erp.englishcampus.com.br. This is how you make a domain name point to a ip address.

84104
  • 12,905
  • 6
  • 45
  • 76
  • I see. This is working. But when I invoke the OAuth redirection, it rejects the URI because it has an IP address inside it: "http://104.197.50.68:8069/google_account/authentication". – Atila Tini Oct 01 '15 at 04:49
  • the A record is working but the call resolves back to the VM IP. – Atila Tini Oct 01 '15 at 04:51
  • Don't use the IP address as part of your URI, use the A record instead. – 84104 Oct 01 '15 at 16:05