# Impersonation API: response\_type: 'token' not working

**URL:** <https://community.auth0.com/t/impersonation-api-response-type-token-not-working/7789>\
**Category:** Get Help\
**Tags:** tokens, impersonation, not-working, user-impersonation, callback-urls\
**Created:** [August 9, 2017, 6:04am UTC](https://community.auth0.com/t/impersonation-api-response-type-token-not-working/7789 "2017-08-09T06:04:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Grayson](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan_grayson/32/6762_2.png) [@Dan\_Grayson](https://community.auth0.com/u/Dan_Grayson)\
**Post date:** [August 9, 2017, 6:04am UTC](https://community.auth0.com/t/impersonation-api-response-type-token-not-working/7789/1 "2017-08-09T06:04:04Z")

</div>

Hi,  
I had a working implementation of impersonation, and it seems that today it stopped working because the impersonation API `MY_DOMAIN.auth0.com/users/USER_ID/impersonate` is generating an impersonation url with a redirect that no longer contains the `id_token` and `access_token` in the hash of the callback url. I have not made any code changes related to my API call since it was last working.

For the call to the impersonation API endpoint, if I change the `additionalParameters.response_type` to ‘code’ instead of ‘token’, a code will be appended to my callback url as a query string parameter, but my SPA at the callback url would really like the tokens as it had before.

**My question is: has support for response\_type: ‘token’ been dropped or otherwise broken recently? And if it is still a functional feature, what might I be missing that’s necessary for it to work?**

Here’s a sample request payload:

```
{"protocol": "oauth2","impersonator_id": "MY_IMPERSONATOR_ID","client_id": "MY_CLIENT_ID","additionalParameters":{"response_type": "token","state": "", "scope": "openid profile", "callback_url": "https://localhost:8080/logout"}}

```

(I also have a valid bearer token in the request Authorization header)

---

<div class="post-metadata">

**Author:** ![Dan\_Grayson](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan_grayson/32/6762_2.png) [@Dan\_Grayson](https://community.auth0.com/u/Dan_Grayson)\
**Post date:** [August 9, 2017, 11:48pm UTC](https://community.auth0.com/t/impersonation-api-response-type-token-not-working/7789/2 "2017-08-09T23:48:17Z")

</div>

In this question:  
[http://community.auth0.com/questions/4726/does-anyone-else-use-impersonation-and-has-securit](http://community.auth0.com/questions/4726/does-anyone-else-use-impersonation-and-has-securit)  
, a user reports that technical support has provided him with the following information:

> “Note, that we do not recommend using  
> the impersonation feature as it may  
> introduce security vulnerabilities  
> into your application. We are working  
> on a new impersonation implementation,  
> however don’t yet have an ETA for  
> this.”

I’d also love a clarification from someone at Auth0 about these vulnerabilities, and if there’s a way for me to protect against them from my end. I’m tasked with creating an impersonation tool for my team, and this will affect whether the whole initiative is viable.

---

<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:55am UTC](https://community.auth0.com/t/impersonation-api-response-type-token-not-working/7789/3 "2018-03-02T05:55:50Z")

</div>


