---
schema_version: "1"
id: c3f829b79800db1d2993e706493893cf1efd3906277604d6bb3ebce475901de4
title: getNamespace()
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_canvas_ApplicationContext_getNamespace.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_canvas_ApplicationContext_getNamespace.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0e339a78dd1f3585a1efb29ac3d5c16572e343812069992d88cc1dc2d5ff38f3
description: Retrieves the namespace prefix of the canvas app.
---
# getNamespace()

Retrieves the namespace prefix of the canvas app.

## Signature

public String getNamespace()

## Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

## Usage

Use this method to get the Salesforce namespace prefix that’s associated with the canvas app.