---
schema_version: "1"
id: 5c9bfe33493b2d2c7945b445ad90d3158475b57d204d240d3f0a47b06eae230c
title: Asset Access
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforce-slack-sdk/apex-slack-sdk/guides/build/assets.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-slack-sdk/guide/assets.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1bc3b70ef64d68129b429087450d15d81468b56c240780349eb1e7164268bbf8
products:
  - Apex SDK for Slack (Beta)
---
# Asset Access

Apex SDK for Slack restricts access to assets using access check validation. Assets include your Slack app definitions, view definitions, actions, and data providers.

Your assets are retrieved from the database on-demand with their associated metadata. It validates that a reference to an asset from another asset is valid. It checks that an asset has access to the asset it's referencing. For example, the framework validates that a component in the `c` namespace can reference an action in `mynamespace` and vice versa.

## Restrict Access to Assets

Access to an Apex action or data provider is based on [access modifiers on your Apex methods](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_access_modifiers.htm). You can't set the access based on metadata.

Only `public` and `global` access modifiers are supported.

- `public`- Your Apex action or data provider can be referenced from the same namespace.
- `global`- Your Apex action or data provider can be referenced from the same or different namespace.

This example class uses the `public` access modifier.

```java
public class AppHomeOpened extends Slack.EventDispatcher { }
```

This method uses the `global` access modifier.

```java
global static String echo(String echoStr) { }
```

## Asset Access Considerations

Invalid use cases can prevent your app or view from being saved correctly. Consider these guidelines when working with Apex SDK for Slack assets.

An app definition (`.slackapp`) references an Apex action using the `apex__action__ClassName` or `apex__action__Namespace.ClassName` format. Let's say that `NamespaceA.ClassName` is `public`. If your app is in `NamespaceB`, it cannot reference `NamespaceA.ClassName`.

A view definition references a data provider using the `apex__MyClassName.getMyMethodName` or `apex__MyNamespace.MyClassName` format. Let's say that `NamespaceA.ClassName` is `public`. If your view definition is in `NamespaceB`, it cannot reference `NamespaceA.ClassName`.

## See Also

- [App Metadata](https://developer.salesforce.com/docs/platform/salesforce-slack-sdk/guide/app-definition.md)
- [View Definitions](https://developer.salesforce.com/docs/platform/salesforce-slack-sdk/guide/views.md)
