Learn how to confidently integrate third-party APIs in your Laravel projects using maintainable, testable and extensible code.
The world of APIs has finally been made simple!
You've built a great app, but now your users want more power.
Maybe they want their monthly reports to be sent to their accounting software. Perhaps they need to automatically create new tasks in their project management tool, or they want contact form submissions to be automatically sent to their CRM.
There’s no doubt that integrating with third-party APIs and adding these features to your app is a great way to add value for your users
, but it can also be super daunting to get started…
In fact, I’d go as far as to say API integrations are one of the most complex and scary things I’ve faced in my entire developer career! There are just so many things you’ve got to know if you want your API integration to work properly and be robust, secure and easy to maintain.
If your client or boss uttering the words “we need it to integrate with XYZ’s API” gives you nightmares, you’re certainly not alone.
What’s more, once you’ve started building your integration, it’s difficult to know how to write automated tests for your code. After all, creating an API integration without writing tests is a surefire way to build an integration that has bugs and is difficult to maintain.
But even more frustrating is the fact it’s also just so damn hard to find reliable information you can trust
.
Take a look online and you’ll come across a huge amount of info about APIs that’s either completely outdated or just plain wrong. If you’ve ever done any research yourself, you’ll know it’s often near impossible to know what’s still relevant, or exactly how some of the concepts you’re learning are supposed to fit into your application.
Theory is great - but what you really need is actionable information
from someone who knows the subject inside out…
And that’s exactly what I’m offering you today
. It’s the comprehensive API manual I wish I had when I started out as a developer. One you can trust and will want to refer back to again and again.
Introducing Consuming APIs in Laravel, your complete guide to confidently building robust and powerful API integrations in your Laravel projects to add cool new features.
Whether you’re an experienced pro or just starting out in your developer career, it includes all the information you need to consume APIs directly from your Laravel application using maintainable, testable, and extensible code.
Inside, you’ll get instant access to over 440-pages of detailed yet easy-to-digest information
with tons of real-world code examples
you can start applying to your projects straight away.
Finally you can easily integrate third-party APIs with your Laravel project and feel confident in doing so!
The book aims to help you build powerful API integrations that are testable, maintainable, and easy to understand
.
I'll show you the way I've built integrations for many projects that help my clients and their users, including specific code examples that give context as to exactly where, why, and how you’d use something in your Laravel app… Something I’ve found to be sorely lacking in many other books and tutorials I’ve read on the subject.
We'll cover techniques that we can use to improve the quality of API integration code
.
We'll look at how we can use these techniques to integrate with real-world APIs using Saloon. We'll cover how to write tests for your API integrations, how to handle rate limits, and how to deal with errors
.
When I started writing the book, one of my main aims was to really hone in on the areas that developers often find particularly confusing. For example, I’ve included a whole chapter on OAuth
, which is a complex topic that people are often scared of going anywhere near, so I finally wanted to make it super understandable and less nightmarish! It contains diagrams and step-by-step instructions on how each “OAuth flow” works.
I’ve also added a full guide on how you can use Saloon in your Laravel applications to interact with an OAuth API
. I’m really hoping that this section makes developers less scared of OAuth and encourages them to feel more confident and comfortable using it.
There’s also a dedicated section on securely handling webhooks
sent from third-party APIs back to your application. I’ve worked on many projects where the developers haven’t written secure code for handling the webhooks, which has meant that there have been security vulnerabilities in the systems that could be exploited. Using code examples, I’ll show you exactly how to securely handle webhooks and make your API integration more robust and bulletproof.
In my experience, it’s information like this that is pure gold when it comes to becoming more competent and confident with handling APIs.
Throughout, I’ve really tried hard to break down a lot of the barriers and make everything super simple for you to dive right in with confidence and make your Laravel projects even more awesome!
You'll learn how to make requests to third-party API integrations using Saloon.
Discover how to securely handle webhooks sent from third-party APIs back to your Laravel application.
Master how to write tests for your API integrations to prove they work as expected.
You'll learn how to cache responses from third-party APIs to reduce the number of requests you make and improve your application's performance.
You'll uncover techniques that you can use to avoid hitting rate limits when making requests to third-party APIs.
Learn different ways to effectively handle errors that occur when making requests using your API integration.
Discover exactly how to use OAuth to authenticate with third-party applications (such as GitHub) directly from your Laravel applications.
You'll learn several techniques that you can use to improve the quality of your API integration code, such as data transfer objects, read-only classes and properties, strict type checking, and more.
You'll fully understand APIs, how they work, and the benefits they can provide for businesses.
We'll be covering how to consume APIs using Saloon v3, an awesome PHP package built by Sam Carré that has over 500k downloads!
Saloon provides a simple, fluent, and object-oriented approach for consuming APIs, making it easy for you to build API integrations without having to worry about the underlying implementation.
Inside, we'll take a look at what Saloon is, the benefits of using it, and alternative approaches that you may want to use. We'll then step through and reveal exactly how you can confidently install and use Saloon in your Laravel applications.
Instant access to the entire book. Start learning in minutes!
Start learning how to build your own awesome API integrations.
What's included:
PDF (Light Mode)
PDF (Dark Mode)
EPUB (for E-Readers)
Instant Access
Both books for one great value price!
Instant access to Consuming APIs in Laravel + my best-selling book Battle Ready Laravel, the complete blueprint for learning how to audit, test and improve your Laravel applications.
What's included:
Both books
PDF (Light & Dark Mode)
EPUB (for E-Readers)
Instant Access
Hey there! My name's Ash Allen
!
I'm a Laravel web developer
from the UK.
I've worked with many companies around the world to help build and improve Laravel applications they can be proud of!
I wrote "Battle Ready Laravel" which has sold over 1,200+ copies
and is available as a PDF, EPUB, and a paperback. I've also written "The Clean Coder's Guide to Laravel" which has been downloaded more than 5k times, and I have an active blog where I write about Laravel and PHP. I've also had articles published on the Laravel News and Honeybadger blogs.
I have several PHP packages (such as Short URL and Laravel Exchange Rates) which have been installed over 610k times
. I also love working on other open-source projects and have contributed to the Laravel framework.
Ash Allen 🚀
Web Developer
Dwight Watson
@DwightConradIt was super helpful in making sense of all the different types of APIs I’ve reckoned with in the past, properly understanding the differences and the conventions of each standard. Also great to learn better approaches to testing my API integrations going forward .
Sam Carré
@carre_samThis book is a treasure trove of knowledge and practical ways to integrate with third party APIs. Ash has a brilliant skill of breaking down complex integration methods and RFC specification into beautiful, readable and testable code .
Helge Sverre
@HelgeSverreIt's very good , buy it!
Häz
@haztakkiAn excellent resource for developers who want to learn about webhooks. The book provides clear and concise examples, and breaks down complex concepts into bite-sized chunks , making it easy to follow and understand. I highly recommend this book to anyone who wants to deepen their knowledge of webhooks.
Aleksander Bless
I loved the course. I'm now able to use Saloon to create the integrations I wanted .
Jon Purvis
@CriticalRespawnIf you work on a Laravel application and that application hooks into an API such as Stripe, GitHub, HubSpot etc... then this book is absolutely for you. There's a lot of great content and it's changed how I plan on approaching handling APIs in the future
The book is available to download as a PDF or as an EPUB. You'll get both of these versions when you purchase the book through this site.
You can buy a printed copy of Consuming APIs in Laravel from Amazon. You can either buy it from amazon.com using this link, or you can search for 'Consuming APIs in Laravel' on your region's Amazon site.
Yes! I do offer PPP (purchasing power parity) and a student discount. Drop me an email at mail@ashallendesign.co.uk and I'll provide you with a discount code that you can use.
Of course! As soon as you purchase the book, you'll be sent an email with the invoice.
Sure! If you have any questions at all, you can get in touch with me at mail@ashallendesign.co.uk
Enter your name and email below and you'll get sent a free sample from the "Webhooks" chapter about:
Building Webhook Routes
Webhook Security