Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

145
Views
Obtain the redirected url Javascript/React/NextJS

I have a url that redirects to a second url, and I want to be able to access the second redirected url. If I paste the url into my browser and open Chrome Dev Tools, I can see the redirected url in the Response Headers.

Image of redirect url in Chrome Dev Tools

I can also see the redirect url in Terminal with curl. Image of curl GET request/response

However, performing a regular GET request using Postman I am unable to access the response headers, and making a GET request in axios returns an error.

export const getTikTokRedirectLink = async () => {
  try {
      const finalUrl = 'https://www.tiktok.com/t/ZTRemVWYt/?k=1';

      const response = await axios.get(`${finalUrl}`);

      console.log(response);

      return response.data;

  } catch(error) {
      const result: IAPIResponse = {
          data: null,
          hasError: true,
      };
      console.log('Error:' , error);
      return result;
  }
};

How can I get access to the redirect url https://www.tiktok.com/@shopmybazar/video/7094675643446807854?_t=8TYGqYqaUSA&_r=1 using the input url https://www.tiktok.com/t/ZTRemVWYt/?k=1?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Are you passing all the required request headers? You can check same in the image .

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!