Skip to content
Yos666666 edited this page Sep 14, 2021 · 5 revisions

How to use the connector

  1. Install aquila-connector :

npm i aquila-connector

  1. Let's code : Just get a specific page
import { getPageStatic } from 'aquila-connector/api/static';
const staticPage = await getPageStatic("my_slug", "fr");
  1. Please note that some Aquila CMS API routes require a JWT. It is necessary to pass it via axios in the theme using aquila-connector :
import axios from 'aquila-connector/lib/AxiosInstance'; // Import axios instance from aquila-connector
axios.defaults.headers.common['Authorization'] = 'JWT'; // Set JWT
Clone this wiki locally