I had used this code previously to use Tiktok OAuth in my react native app. But now tiktok is shifting to v2 from 12 September,2023. I want to replace this code of mine with new code.
const baseUrl = 'https://open-api.tiktok.com/platform/oauth/connect/';
const scope = 'user.info.basic';
const state = Math.random().toString(36).substring(7);
const queries = `client_key=${clientId}&response_type=code&scope=${
scope}&redirect_uri=${redirectURI}&state=${state}`;
return `${baseUrl}?${queries}`;
I want a replacement for this url https://open-api.tiktok.com/platform/oauth/connect/ but i am not able to find it in Tiktok documentation. On tiktok only this url is given https://www.tiktok.com/v2/auth/authorize/. My code is not working with this url.
Please guide me to migrate my code to v2 auth.
With this v2 Url https://www.tiktok.com/v2/auth/authorize/. I am getting this error Image