# Exhange the access\_code for an id\_token using in php get the response error: access\_denied and error\_description: Unauthorized

**URL:** <https://community.auth0.com/t/exhange-the-access-code-for-an-id-token-using-in-php-get-the-response-error-access-denied-and-error-description-unauthorized/8416>\
**Category:** Get Help\
**Tags:** jwtconfiguration\
**Created:** [October 7, 2017, 3:00pm UTC](https://community.auth0.com/t/exhange-the-access-code-for-an-id-token-using-in-php-get-the-response-error-access-denied-and-error-description-unauthorized/8416 "2017-10-07T15:00:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rameshmrm](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@rameshmrm](https://community.auth0.com/u/rameshmrm)\
**Post date:** [October 7, 2017, 3:00pm UTC](https://community.auth0.com/t/exhange-the-access-code-for-an-id-token-using-in-php-get-the-response-error-access-denied-and-error-description-unauthorized/8416/1 "2017-10-07T15:00:14Z")

</div>

I am tried to using hosted page login URL based get the response code after that code based to try to get the JWT token in user profile details, Using PHP with curl but I got error response  
error:access\_denied,  
error\_description: Unauthorized

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [October 9, 2017, 3:55pm UTC](https://community.auth0.com/t/exhange-the-access-code-for-an-id-token-using-in-php-get-the-response-error-access-denied-and-error-description-unauthorized/8416/2 "2017-10-09T15:55:56Z")

</div>

The provided information is insufficient for a definitive answer, however, **one of the possible reasons for an `Unauthorized` error** description would be if you **provide the incorrect client secret** used for client authentication during the exchange.

---

<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 2, 2018, 5:56am UTC](https://community.auth0.com/t/exhange-the-access-code-for-an-id-token-using-in-php-get-the-response-error-access-denied-and-error-description-unauthorized/8416/3 "2018-03-02T05:56:52Z")

</div>


