# Pass custom param to token endpoint in custom social connection

**URL:** <https://community.auth0.com/t/pass-custom-param-to-token-endpoint-in-custom-social-connection/92296>\
**Category:** Get Help\
**Tags:** custom-social-connec\
**Created:** [October 13, 2022, 2:15am UTC](https://community.auth0.com/t/pass-custom-param-to-token-endpoint-in-custom-social-connection/92296 "2022-10-13T02:15:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dseravalli](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dseravalli/32/40560_2.png) [@dseravalli](https://community.auth0.com/u/dseravalli)\
**Post date:** [October 13, 2022, 2:15am UTC](https://community.auth0.com/t/pass-custom-param-to-token-endpoint-in-custom-social-connection/92296/1 "2022-10-13T02:15:27Z")

</div>

TikTok requires `client_key` to be passed on requests to their authorize and token endpoints instead of `client_id`. I have been able to set custom `options.authParams` on the connection using the Management API for the authorize call ([docs](https://auth0.com/docs/authenticate/identity-providers/social-identity-providers/oauth2#pass-provider-specific-parameters)), but don’t see a way to do this for the token call, so the connection does not work with error `InternalOAuthError: Failed to obtain access token`.

I have verified that the authorization code retrieved by Auth0 works if I use it in a manual cURL request to TikTok’s token endpoint with the params it expects.

TikTok docs: [TikTok for Developers | TikTok](https://developers.tiktok.com/doc/login-kit-manage-user-access-tokens)

---

<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:** [October 27, 2022, 5:43pm UTC](https://community.auth0.com/t/pass-custom-param-to-token-endpoint-in-custom-social-connection/92296/3 "2022-10-27T17:43:57Z")

</div>

Hi @dseravalli,

Welcome to the Auth0 Community!

From what I can tell, this isn’t possible. As you’ve already noticed, you can map new parameters on the call to authorize, but this doesn’t extend to the token endpoint call.

If you’d like to, you can create a [Feature Request](https://community.auth0.com/c/feedback/95) for it.

Ideally, TikTok would conform to OAuth2 specs and use `client_id`. Using the term `client_key` looks like a holdover from OAuth1, even though it appears Tik Tok has implemented other OAuth2 standards.

---

<div class="post-metadata">

**Author:** ![dseravalli](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dseravalli/32/40560_2.png) [@dseravalli](https://community.auth0.com/u/dseravalli)\
**Post date:** [October 28, 2022, 6:09pm UTC](https://community.auth0.com/t/pass-custom-param-to-token-endpoint-in-custom-social-connection/92296/4 "2022-10-28T18:09:14Z")

</div>

Thanks, I submitted the feature request. I am now trying to implement TikTok using a proxy for the token call but can’t get it to work. I have my proxy server successfully receiving params from Auth0, passing them to TikTok as required, retrieving an access token payload (appears to be spec-compliant), and returning it as JSON to Auth0. Auth0 just times out on the token call however when I test the flow and I don’t know why.

---

<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:** [November 28, 2022, 8:55pm UTC](https://community.auth0.com/t/pass-custom-param-to-token-endpoint-in-custom-social-connection/92296/5 "2022-11-28T20:55:54Z")

</div>

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