0

I am trying to obtain an access token for the Instagram API, but when I run this code in the CMD window on windows:

curl -F 'client_id=IDNUMBER' curl -F 'client_secret=CODE' curl -F 'grant_type=authorization_code' curl -F 'redirect_uri=URL' curl -F 'code=CODE' https://api.instagram.com/oauth/access_token

as outlined here:

https://instagram.com/developer/authentication/

I get this error:

curl (6) couldn't resolve host 

What could be the issue?

user1937021
  • 10,151
  • 22
  • 81
  • 143

1 Answers1

0

You got the program call wrong.

curl -F 'client_id=IDNUMBER' curl [...]

That is, you have given curl as a parameter to curl, which thinks it should look up a host named curl.

Remove all extra "curl" and write:

curl -F 'client_id=IDNUMBER' -F 'client_secret=CODE' -F 'grant_type=authorization_code' -F 'redirect_uri=URL' -F 'code=CODE' https://api.instagram.com/oauth/access_token
Martin Nyolt
  • 4,463
  • 3
  • 28
  • 36