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

166
Views
how to convert the instagram curl post request to javascript request?

I'm trying to change the code i got from Instagram to a token. In Instagram DOCS it is writes with a curl request and i want to use JavaScript. its look like this:

curl -X POST \
  https://api.instagram.com/oauth/access_token \
  -F client_id={app-id} \
  -F client_secret={app-secret} \
  -F grant_type=authorization_code \
  -F redirect_uri={redirect-uri} \
  -F code={code}

I'm trying to understand what is -F and with what symbol to replace it.

Any solution will help, thank you.

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

0

-F is for emulating html form submission https://curl.se/docs/manpage.html#-F

if you want to sent the request using JavaScript fetch() API, set all those parameters as body of request and set the content type to application/x-www-form-urlencoded

if you are sending these requests interactively, alternatively you can create an HTML page with a form and submit button.( e.g. https://www.w3schools.com/tags/att_form_enctype.asp )

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!