---
title: "Generating Tokens and Loading the Editor"
canonical: https://customerscanvas.com/docs/cc6/amazon-s3-tokens.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["6.15.0", "6.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# Generating Tokens and Loading the Editor

**Applies to:** Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · **Archived documentation**
 
In addition to [general configuration parameters](https://customerscanvas.com/docs/cc6/amazon-s3-config-in-de.htm.md) responsible for displaying images, you must pass user-specific parameters: the user ID (representing a folder in your Amazon S3 bucket) and a token within the editor's config.
 
To generate tokens, the Design Editor provides the following endpoint:
 `GET /api/users/{userId}/getToken` 
This method accepts the **userId**=[string] parameter. Here, you must pass a folder in your Amazon S3 bucket.
 
If successful, the token will appear in the response as follows:

```
"7FCE96562C0D5CEADDF02A73B4757495"
```
 
Now, you can use this token when loading the editor. The following example illustrates how you can generate a token and pass it into the Design Editor.
 
```
const userId = "JohnWood";
let response = await fetch(`https://localhost:44500/api/users/${userId}/getToken`, {
    headers: {
        'X-GoogleDriveAPIKey': 'UniqueSecurityKey'
    }
});
            
const token = await response.json();

let product = {
    "surfaces": [{
        "printAreas": [{ "designFile": "invitation" }]
    }]
};

let config = {
    "assetSources": {
        "[source]AmazonS3": {
            "requestParams": {
                "token": token,
                "userId": userId
            }
        }
    }
};

let editor = await CustomersCanvas.IframeApi.loadEditor(
            document.getElementById("editorFrame"), product, config);
```
 
## See Also
  
### Manual
 
- [Configuring the Design Editor](https://customerscanvas.com/docs/cc6/amazon-s3-config-in-de.htm.md)
- [The Asset Manager](https://customerscanvas.com/docs/cc6/asset-manager.htm.md)
