# Symfony Api platform how test permissions and roles with auth0

**URL:** <https://community.auth0.com/t/symfony-api-platform-how-test-permissions-and-roles-with-auth0/183374>\
**Category:** Get Help\
**Tags:** other, test\
**Created:** [March 5, 2025, 1:12pm UTC](https://community.auth0.com/t/symfony-api-platform-how-test-permissions-and-roles-with-auth0/183374 "2025-03-05T13:12:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin.schmitt.upjv](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@kevin.schmitt.upjv](https://community.auth0.com/u/kevin.schmitt.upjv)\
**Post date:** [March 5, 2025, 1:12pm UTC](https://community.auth0.com/t/symfony-api-platform-how-test-permissions-and-roles-with-auth0/183374/1 "2025-03-05T13:12:56Z")

</div>

Hello,

I have a question regarding Symfony API Platform and how with functional test permissions and roles when using Auth0 token (I am using the Auth0 PHP SDK to decode the token).

My approach to securing endpoints is to decode the permissions and roles using an authenticator when the API receives the Auth0 token.

What is the best rpactice to test my application ?  
Create fake auth0 token for the test ? If yes how ?

Thanks!

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [March 10, 2025, 4:30pm UTC](https://community.auth0.com/t/symfony-api-platform-how-test-permissions-and-roles-with-auth0/183374/3 "2025-03-10T16:30:12Z")

</div>

Hi @kevin.schmitt.upjv

Regarding testing your API, I would recommend to review our documentation about [Access Tokens](https://auth0.com/docs/secure/tokens/access-tokens) and [Token Best Practices](https://auth0.com/docs/secure/tokens/token-best-practices).

For testing the tokens, I would recommend to create different users either via the Management API or the Auth0 Dashboard in order to test our their permissions, roles and scopes within your API.

If you have any other questions, feel free to leave a reply!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 24, 2025, 4:30pm UTC](https://community.auth0.com/t/symfony-api-platform-how-test-permissions-and-roles-with-auth0/183374/4 "2025-03-24T16:30:56Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
