From the course: API Testing Foundations

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

Setting up OAuth

Setting up OAuth

- [Instructor] Have you ever used the login with Google option when signing up for a site? Do you know that this uses API tokens? It uses a very common auth workflow known as OAuth 2.0. Now, OAuth can get a bit complicated, so I want to spend a few minutes making sure you understand how it works and I'm going to use the Imager API to show you. So if you want to follow along at home, you'll need to make sure you have an Imager account. Let's first look at trying to call one of their API endpoints without any auth setups. There's no auth on here. Let's send this and you can see that we get a unauthorized response. All right, so let's try setting up an OAuth workflow in Imager. The first thing that we're going to need to do is to actually register a client or kind of create an application that is going to use this endpoint. We can do that by going to this oauth2/addclient URL on their API and we'll create an application…

Contents