Anil Ugale
Anil Ugale

Reputation: 1098

Gmail contextual gadget error during SSO with open social id: Unknown RPC service: osapi._handleGadgetRpcMethod

I'm trying to develop Gmail contextual gadget and trying to get the currently logged in user's email address.

I tried the following code as per this link: https://developers.google.com/google-apps/marketplace/best_practices#gadget_sso

 function init() {
        osapi.http.get({
        'href' : 'http://yourserver.com',
        'format' : 'json',
        'authz' : 'signed'
      }).execute(handleLoadResponse);
    }

I'm constantly getting the error "Unknown RPC service: osapi._handleGadgetRpcMethod " on Chrome Devtools console and I'm not getting any request on my server.

Could someone help here? It looks like a Osapi Library issue. Would really appreciate any help.

Upvotes: 2

Views: 412

Answers (1)

cloudpre
cloudpre

Reputation: 1001

osapi is deprecated. you need to be using gadgets.io.makeRequest with parameters set as

params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.OAUTH;

Upvotes: 1

Related Questions