Pergunta

I am trying to build a gmail contextual gadget that talks to a 3rd party oauth api following the documentation at https://developers.google.com/gadgets/docs/oauth

I have registered the gadget at https://www.google.com/gadgets/directory/verify

I am using gadgets.io.makeRequest(url, callback, params) with the following params from the gadget.

params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
      params[gadgets.io.RequestParameters.AUTHORIZATION] =gadgets.io.AuthorizationType.OAUTH;
      params[gadgets.io.RequestParameters.OAUTH_SERVICE_NAME] = "service";
      params[gadgets.io.RequestParameters.OAUTH_USE_TOKEN] = "always";
      params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;

The request that is sent to the oauth requesttoken url of the service does not contain the consumer key that was specified when verifying the gadget, it is set to oauth_consumer_key="www.google.com"

Are there any other steps or settings I need to complete to get google to send the correct consumer key?

Foi útil?

Solução

If anyone else comes across this, it turns out that even though it was not sending the correct consumer key with the request, it was signing it with the correct secret and cert so it still works.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top