Really stuck on instantiating the Auth0 PHP SDK

Hi, just going crazy following this tutorial.

To cut a long story short, instantiating the SDK is not working for me. It throws an error 500. So I wrapped the statement in a try… catch, like this, to see what the error was…

try {
    $auth0 = new \Auth0\SDK\Auth0([
    'domain' => $_ENV['AUTH0_DOMAIN'],
    'clientId' => $_ENV['AUTH0_CLIENT_ID'],
    'clientSecret' => $_ENV['AUTH0_CLIENT_SECRET'],
    'audience' => $_ENV['AUTH0_AUDIENCE']
} catch (Exception $e) {

it turns out that the audience parameter is not correct, all other parameters are correct. This is the error message that I captured.

Validation of “audience” was unsuccessful

I’ve been careful to populate the .env file with the information provided in the Auth0 configuration screens correctly. The audience should be the easiest of all, it even appears in your API list, with the copy button & all!

Anybody else has encountered this problem?

All I need is for my PHP code to validate that the Bearer token that it receives in the http request header is a good one. But can’t get past the first step using the Auth0 SDK.

Any help will be appreciated!!!

Hey there!

In order to handle that most effectively can I ask you to raise it as a GitHub issue in the repo so we can work on that directly with the quickstart maintainers?

Once you have a link, can you share it here so we can ping them. Thank you!