Newer Version Available
Client
The Client object is a JSON-formatted object returned by the signed request in the CanvasRequest object. It contains context information about the client app.
| Field | Description |
|---|---|
| instanceId | The ID of a canvas app exposed on a Visualforce page. Used internally for canvas app instance management. |
| instanceUrl | The URL of the Salesforce instance. For example, http://instance.salesforce.com. Used to preface the URLs returned by the Links object. |
| oauthToken | The OAuth access token that’s returned to the caller. |
| refreshToken | The token that the client uses to authenticate a session. This value is returned only if the canvas app has “Perform requests on your behalf at any time (refresh_token, offline_access)” as one of the selected OAuth scopes; otherwise null is returned. |
| targetOrigin | The URL of the canvas app. Used internally for cross-domain communication between the page and the iFrame that contains the canvas app. |
The following code snippet shows an example of the Client object.
1"client":
2{
3 "instanceId":"06Px000000002JZ",
4 "instanceUrl":"http://instance.salesforce.com:8080",
5 "oauthToken":"00Dx0000X00Or4J!ARQAQJ34YLUq54RMTrQbxVoWUgorjFi3...",
6 "refreshToken":"00DD0000000K1NM!ARAAQGJVGOyMjh1jjqvShRpLuAq0ke...",
7 "targetOrigin":"http://instance.salesforce.com:8080"
8}