# Trying to validate Access token with Auth0 PHP, but I get The JWT string must contain two dots

**URL:** <https://community.auth0.com/t/trying-to-validate-access-token-with-auth0-php-but-i-get-the-jwt-string-must-contain-two-dots/96553>\
**Category:** Get Help\
**Tags:** classic-universal-login-experience, login-experience\
**Created:** [December 15, 2022, 4:49pm UTC](https://community.auth0.com/t/trying-to-validate-access-token-with-auth0-php-but-i-get-the-jwt-string-must-contain-two-dots/96553 "2022-12-15T16:49:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmmaxxx](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mmmaxxx/32/33037_2.png) [@mmmaxxx](https://community.auth0.com/u/mmmaxxx)\
**Post date:** [December 15, 2022, 4:49pm UTC](https://community.auth0.com/t/trying-to-validate-access-token-with-auth0-php-but-i-get-the-jwt-string-must-contain-two-dots/96553/1 "2022-12-15T16:49:14Z")

</div>

I’m trying to validate the access token I receive from my react native app in the backend using the Auth0 PHP package. But I keep getting the following error

```auto
Auth0\SDK\Exception\InvalidTokenException: The JWT string must contain two dots in Auth0\SDK\Exception\InvalidTokenException::badSeparators() (line 42 of /Users/USER/Sites/APPNAME/vendor/auth0/auth0-php/src/Exception/InvalidTokenException.php).

```

But checking the token I’m sending, it does contain 2 dots, here is what I’ve done in the backend:

 ![screencap1](https://global.discourse-cdn.com/auth0/original/3X/8/f/8f093aa433a8960d9234ff65249696091174299b.png)  
 ![screencap2](https://global.discourse-cdn.com/auth0/original/3X/1/9/192f229857ba83781587610011da709f4f772a8b.png)

Is there anything I’m doing wrong?

Thanks

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 15, 2022, 8:10pm UTC](https://community.auth0.com/t/trying-to-validate-access-token-with-auth0-php-but-i-get-the-jwt-string-must-contain-two-dots/96553/3 "2022-12-15T20:10:25Z")

</div>

Hi @mmmaxxx,

Welcome to the Auth0 Community!

Could you provide an example token you are seeing? Have you tried decoding it with [JWT.io](http://JWT.io)?

---

<div class="post-metadata">

**Author:** ![mmmaxxx](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mmmaxxx/32/33037_2.png) [@mmmaxxx](https://community.auth0.com/u/mmmaxxx)\
**Post date:** [December 15, 2022, 8:41pm UTC](https://community.auth0.com/t/trying-to-validate-access-token-with-auth0-php-but-i-get-the-jwt-string-must-contain-two-dots/96553/4 "2022-12-15T20:41:35Z")

</div>

Hi Dan  
Here is an access token:

```auto
eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwiaXNzIjoiaHR0cHM6Ly9kZXYtazFreTF1OGd4aXRndTdqcy51cy5hdXRoMC5jb20vIn0..J-lwvtJENQqaGaIu.XBOufABotm_we9vhPzaSm9TPrU9tfQAfJ3Sqpheif0gTLpR2Q8rSjf6t0TSQ3jl_OlYmVJ8UvcLO0mJZz9KbGdfzJPqqXc5YdbKgwX8kHF5DqB5ld7gwe24V4YaItaEH00cI-oKG5T9P69bTTmg4UZBAlx_A7-B5knnFBi5CoKWH34zAkNhKjwaOVare_kislgZg-yXGijSI82Hf4hGBvmFJqyo6a5-FF1Bjq-s0hcWszdL6QYGSz0kNCrMnjAfpE8q9wNXnwNNfXLgLY8M2d7Ii1NHtIlM7L4oZ9V-MFuaBtqPJe6oitjrZMWbR8AxFjVae8r2fGtTiw596kanYkNaMxhhIKgRgdjDOxOfPE_9EyGtB0lG9y9mL1m-cqn2GB3aNoQ.7AP6u3CszXy4E4qEN17zvg

```

I’ve tried decoding it with [JWT.io](http://JWT.io) but without success

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 16, 2022, 3:11pm UTC](https://community.auth0.com/t/trying-to-validate-access-token-with-auth0-php-but-i-get-the-jwt-string-must-contain-two-dots/96553/5 "2022-12-16T15:11:35Z")

</div>

@mmmaxxx,

That appears to be an opaque token. You will need to request a JWT. Here’s an FAQ about it:

[https://community.auth0.com/t/why-is-my-access-token-not-a-jwt-opaque-token/31028](https://community.auth0.com/t/why-is-my-access-token-not-a-jwt-opaque-token/31028)

---

<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:** [January 30, 2023, 9:40pm UTC](https://community.auth0.com/t/trying-to-validate-access-token-with-auth0-php-but-i-get-the-jwt-string-must-contain-two-dots/96553/6 "2023-01-30T21:40:51Z")

</div>

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