Develop a REST API in PHP

REST APIs are the definition of modern web development. While they are easy to build in just about any modern framework, most PHP developers choose to use Lumen/Laravel or Symfony. These frameworks make it easy to handle complex issues like authentication/authorization, request validation, data transformation, filters, rate throttling, complex endpoints with sub-resources, and API documentation.

A complex framework isn’t necessarily needed to build a secure API. In this post, you’ll build a simple REST API in PHP from scratch. You’ll secure your API with Okta by implementing the Client Credentials Flow.