Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a username from the TikTok API

I have searched for many days now, but didn't found a field in the TikTok API where I can get the username of the user that has connected his TikTok account with my website. I want to let user log in with their TikTok account to let them link it from my website to TikTok and want to display their "@" name (not the display name. I can only get their IDs etc. but no their username. If anyone can help I'd be very happy!

I searched on many forums for this but didn't sound any solution. I'm expecting to be able to send a request to the official TikTok API which then replies the username of someones ID or of someones Token I own.

like image 279
Fitschi Fitschi Avatar asked Oct 28 '25 22:10

Fitschi Fitschi


1 Answers

On Get User Info API route you can put username on fields arguments like this :

https://open.tiktokapis.com/v2/user/info/?fields=profile_deep_link,username

This field username is not documented (maybe a mistake in TikTok side) but it work well for me, you can see the screenshot : enter image description here

like image 67
JC Guidicelli Avatar answered Oct 31 '25 01:10

JC Guidicelli



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!