From the course: Code Clinic: Swift

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

View the ipinfo.io API

View the ipinfo.io API - Swift Tutorial

From the course: Code Clinic: Swift

Start my 1-month free trial

View the ipinfo.io API

- [Instructor] Before we write any code, let's take a look at the API that we're going to be using from ipinfo.io. You can find their API at ipinfo.io/developers. For this, I've actually created an account, and you can do that as well if you want, but, most likely, you won't need to create an account. If you find yourself making these URL requests and you're finding that they're being blocked, or something is not working, then the first thing you wanna do is come back here and create an account really quick. With a free account you can get an access token and continue to make requests. Once you've created your account, simply click the account button, and you should see your access token in your account overview. You can set that as your token inside of your code as a URL parameter when you're using the API. I'll go back now. If you look at the API, as you scroll down you're going to see that if you just curl ipinfo.io you're going to get your IP address. If you add the forward slash…

Contents