Installation

Set up the SDK in your project.

1 min read

This guide will walk you through the installation process to get you up and running in no time.

Prerequisites

Before you begin, please ensure you have the following installed:

  • PHP 7.4 or higher
  • Composer, the dependency manager for PHP

Installing the SDK

You can install the SDK via Composer. This is the recommended method for managing dependencies in your PHP projects. Run the following command in your project's root directory:

composer require brd6/notion-sdk-php

HTTP client flexibility (PSR-18)

This SDK is designed to be flexible and decoupled from any specific HTTP client implementation. It follows the PSR-18 (HTTP Client) standard, which means you can use your favorite HTTP client library as long as it's compliant with PSR-18.

This approach allows you to integrate the Notion SDK seamlessly into your existing projects without forcing you to adopt a new HTTP client.

Quick Start: Installing a client

If you don't have a preferred PSR-18 client, we recommend using along with for PSR-7 message implementations. You can install them with the following command:

composer require symfony/http-client nyholm/psr7

With these packages, you'll have everything you need to start making requests to the Notion API.

Next steps

Now that you have the SDK installed, the next step is to authenticate your requests. Head over to our Authentication guide to learn how.

Did this answer your question?