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

123
Views
How to retrieve query parameters from GET request using javascript?

Below is my GET request. I am trying to retrieve the client_id and redirect_uri parameters.

https://sdkapp.example.com:8443/central-login/index.html?client_id=dtvClient&redirect_uri=https://www.example3.com:443/callback

And then utilize those values, in a embedded js script within the same html page.

Config.set({
  clientId: //fetched query parameter for client_id
  redirectUri: // fetched query parameter for redirect_uri
  });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If this is on the client you can use URL and searchParams

// const url = new URL(location.href); // uncomment and delete next line
const url = new URL("https://sdkapp.example.com:8443/central-login/index.html?client_id=dtvClient&redirect_uri=https://www.example3.com:443/callback"); // for example

const obj = {
  "clientId": url.searchParams.get("client_id"),
  "redirectUri": url.searchParams.get("redirect_uri")
};
console.log(obj)

// Config.set(obj)

If on the server: for example node also has URL

And here is an answer for php: Get URL query string parameters

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!