# I got the error 'Profile does not have access to: \[Apex class]' when launching a Flow. What should I do ?

If you got an error such as **Profile does not have access to: sharinpix\_\_RenameAlbum** while attempting to launch a Flow (or a Process Builder) that makes use of SharinPix classes or when using custom Apex classes that include SharinPix features, this is due to missing access to the mentioned class for the user that launched the automation.

To correct such errors, you should assign the Apex class to the user or profile attempting to launch the automation as follows:

* If you are using the Apex class included in the SharinPix package, you can simply assign the permission set named **SharinPix Lightning Components** to the user. \
  \
  **Note:** Such classes start with the namespace **sharinpix**, for example, **sharinpix\_\_TokenGeneration**
* If you are using a custom Apex class, you should then assign the specified class to the user profile. For more details on how to assign an Apex class to a profile, click [here](https://help.salesforce.com/articleView?id=sf.users_profiles_apex_access.htm\&type=5).

{% hint style="warning" %}
**Note:**

Detailed error messages relating to Salesforce Flow failures are sent by email. These messages are useful to identify the cause of the error as well as the user with the missing access to the Apex class.

You can control who receives process error emails. For more information on how this is done, click [here](https://help.salesforce.com/articleView?id=sf.flow_troubleshoot_error_email.htm\&type=5).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sharinpix.com/faqs/i-got-the-error-profile-does-not-have-access-to-apex-class-when-launching-a-flow-what-should-i-do.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
