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.