From the course: Scripting for Testers
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Authentication - Python Tutorial
From the course: Scripting for Testers
Authentication
- [Instructor] You've seen how easy it is to make API calls. You can now make calls to any public API, which is great. However, many APIs require some form of authentication if you want to access them. I don't want to get into all the details of API authentication in this video, but let's take a look at a few types that you might encounter and see how you can call APIs that use them. So the first type I want to look at is called basic auth. As the name implies, it's pretty basic. All you need to do is specify a username and password. So let's test this out with our gig tracker application. I've already got Python opened here and I've specified the base URL to our application. And once again, a reminder that your URL will be different than this. Let's start setting up a request. So I'll do a response to store what we get back, and then we'll do requests.get, and once again, we're going to use this base_url, and then we're going to do api/users on the end of it. But let's try, instead…
Contents
-
-
-
Exploring the API with Postman4m 39s
-
(Locked)
REST API calls in Python6m 22s
-
(Locked)
Authentication9m 55s
-
Setting up Visual Studio Code3m 27s
-
(Locked)
Finding an intermittent error10m 14s
-
(Locked)
Challenge: Find the API rate limit2m 59s
-
(Locked)
Solution: Find the API rate limit5m 38s
-
(Locked)
Generate fake input data4m 54s
-
(Locked)
Creating test data through API calls7m 37s
-
(Locked)
Using API calls to set up complex test scenarios8m 21s
-
-
-
-
-