---
schema_version: "1"
id: aa0c5dba52715248880a69b5e59ec0f16cf7c4bc7a910c45093fb7d5431955bd
title: CanvasRequest
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/canvas-framework/guides/platform-connect/reference/canvas-request-object.md
canonical_url: https://developer.salesforce.com/docs/platform/canvas-framework/guide/canvas-request-object.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9b8c82918b92748110233783901a8317e0c5cc1e77cb39295d3f432fc093d25d
products:
  - Canvas Developer Guide
  - Platform Developer Content
---

# CanvasRequest

When you use a signed request for authentication in your canvas app, you receive a CanvasRequest object in the initial POST message from Salesforce. This object contains fields related to the request, and also contains the [Context](https://developer.salesforce.com/docs/platform/canvas-framework/guide/context-object.md) and [Client](https://developer.salesforce.com/docs/platform/canvas-framework/guide/client-object.md) objects. The CanvasRequest object is returned in JSON format and contains the following fields.

|Field|Description|
|-----|-----------|
|`algorithm`|The algorithm used to sign the request.|
|`issuedAt`|For internal use only.|
|`userId`|The context user’s ID.|

The following code snippet shows an example of the CanvasRequest object.

```nolang
{
    "context":
    {
        "application": 
        {
            "applicationId":"06Px000000003ed", 
            "authType":"SIGNED_REQUEST", 
            "canvasUrl":"http://MyDomainName.my.salesforce.com:8080
                /canvas_app_path/canvas_app.jsp", 
            "developerName":"my_java_app",
            "isInstalledPersonalApp": false, 
            "name":"My Java App", 
            "namespace":"org_namespace", 
            "options":[],
            "referenceId":"09HD00000000AUM", 
            "samlInitiationMethod":"None",
            "version":"1.0.0"
        },
        "user":
        {
            "accessibilityModeEnabled":false, 
            "currencyISOCode":"USD", 
            "email":"admin@6457617734813492.com", 
            "firstName":"Sean", 
            "fullName":"Sean Forbes", 
            "isDefaultNetwork":false, 
            "language":"en_US", 
            "lastName":"Forbes", 
            "locale":"en_US", 
            "networkId":"0DBxx000000001r", 
            "profileId":"00ex0000000jzpt", 
            "profilePhotoUrl":"/profilephoto/005/F", 
            "profileThumbnailUrl":"/profilephoto/005/T", 
            "roleId":null, 
            "siteUrl":"https://MyDomainName.my.site.com/", 
            "siteUrlPrefix":"/mySite", 
            "timeZone":"America/Los_Angeles", 
            "userId":"005x0000001SyyEAAS", 
            "userName":"admin@6457617734813492.com", 
            "userType":"STANDARD"
        }, 
        "environment": 
        { 
            "parameters":
            {
                "complex":
                {
                    "key1":"value1",
                    "key2":"value2"
                },
                "integer":10,
                "simple":"This is a simple string.",
                "boolean":true
            },
            "dimensions": 
            { 
                "clientHeight":"50px", 
                "clientWidth":"70px", 
                "height":"900px", 
                "width":"800px", 
                "maxHeight":"2000px",
                "maxWidth":"1000px"

            }, 
            "record": 
            {
                "attributes": 
                {
                    "type":"Account",
                    "url":"/services/data/v68.0/sobjects/Account/001xx000003DGWiAAO"
                },
                "Id":"001xx000003DGWiAAO",
                "Phone":"(555) 555-5555",
                "Fax":"(555) 555-5555",
                "BillingCity":"Seattle"
            },
            "displayLocation":"Chatter",
            "locationUrl":"https://salesforce.com/some/path/index.html", 
            "subLocation":null,
            "uiTheme":"Theme3",
            "version": 
            { 
                "api":"68.0", 
                "season":"SUMMER" 
            }, 
        }, 
        "organization":
        {
            "currencyIsoCode":"USD", 
            "multicurrencyEnabled":true, 
            "name":"Edge Communications", 
            "namespacePrefix":"org_namespace", 
            "organizationId":"00Dx00000001hxyEAA"
        },
        "links":
        {
            "chatterFeedItemsUrl":"/services/data/v68.0/chatter/feed-items", 
            "chatterFeedsUrl":"/services/data/v68.0/chatter/feeds", 
            "chatterGroupsUrl":"/services/data/v68.0/chatter/groups", 
            "chatterUsersUrl":"/services/data/v68.0/chatter/users", 
            "enterpriseUrl":"/services/Soap/c/68.0/00Dx00000001hxy", 
            "loginUrl":"http://MyDomainName.my.salesforce.com",
            "metadataUrl":"/services/Soap/m/68.0/00Dx00000001hxy", 
            "partnerUrl":"/services/Soap/u/68.0/00Dx00000001hxy", 
            "queryUrl":"/services/data/v68.0/query/", 
            "recentItemsUrl":"/services/data/v68.0/recent/", 
            "restUrl":"/services/data/v68.0/", 
            "searchUrl":"/services/data/v68.0/search/", 
            "sobjectUrl":"/services/data/v68.0/sobjects/", 
            "userUrl":"/005x0000001SyyEAAS" 
        }
    },
    "client":
    {
        "instanceId":"06Px000000002JZ", 
        "instanceUrl":"http://MyDomainName.my.salesforce.com:8080", 
        "oauthToken":"00Dx0000X00Or4J!ARQAQJ34YL8gKowP65p8FDHkvk.Uq5...", 
        "refreshToken":"00DD0000000K1NM!ARAAQGJVGOyMjh1jjqvShRpLuAq0...", 
        "targetOrigin":"http://MyDomainName.my.salesforce.com:8080"
    }, 
"algorithm":"HMACSHA256", 
"userId":"005x0000001SyyEAAS", 
"issuedAt":null
}

```

-   **[Client](https://developer.salesforce.com/docs/platform/canvas-framework/guide/client-object.md)**  

-   **[Context](https://developer.salesforce.com/docs/platform/canvas-framework/guide/context-object.md)**  


**See Also**  


-   [Objects](https://developer.salesforce.com/docs/platform/canvas-framework/guide/objects-intro.md)
-   [Client](https://developer.salesforce.com/docs/platform/canvas-framework/guide/client-object.md)
-   [Context](https://developer.salesforce.com/docs/platform/canvas-framework/guide/context-object.md)

