Drupal sites connect through JSON:API with a username and password (HTTP Basic Authentication). Posts are created as nodes of the content type you choose. This guide covers the Drupal preparation, the form fields and the most common errors.
Before you start
You are an Owner or Admin of the company in Accounts, or of its agency.
You have administrator access to the Drupal site.
You know the machine name of the content type posts should go into, for example
article.
Step 1: Enable the modules
The form lists the modules that must be enabled. In Drupal, enable:
HTTP Basic Authentication
JSON:API
REST UI
RESTful Web Services
Serialization
Step 2: Allow JSON:API to create content
JSON:API is read-only by default. In the JSON:API settings (under Configuration > Web services), allow create, read, update and delete operations. Publishing fails when write operations are turned off.
Step 3: Create a user for publishing
Create a Drupal user for the platform with permission to create, edit and delete content of your content type, and to use the Full HTML text format. Posts are sent with the body in Full HTML.
Step 4: Check the API address
Open https://your-site.com/jsonapi in a browser. You should see a JSON list of resources. If the site uses a different path, such as nl/jsonapi for a language-specific endpoint, note it for the API Prefix field.
Step 5: Open Connect a Site
In Accounts, go to Companies > open the company > Websites tab.
Click Connect a Site. If the company already has sites, click Connect New Site.
Under Select your CMS, choose Drupal. A notice lists the modules from step 1.
Step 6: Fill in the fields
Field | What to enter |
|---|---|
Drupal Site URL | The site address, for example |
Username | The Drupal user from step 3. |
Password | That user's password. |
API Prefix | Default: |
Content Type | The machine name of the content type. Default: |
Language Code | The language of the content, for example |
Use Field Description | Tick this if the content type has a |
Step 7: Test the connection
Click Test Connection.
The test opens the API prefix, creates an unpublished "Test Article" of your content type and deletes it again.
When it passes, Connect becomes clickable. The form may not show a success message for Drupal.
The test waits up to 5 seconds for each request, so a very slow site can fail the test even when the settings are right.
Step 8: Connect
Click Connect. The site name is read from Drupal's site settings, or the domain is used. The window closes and the site appears in the company's Websites list.
Changing the connection later
In Accounts, go to Websites > open the site > Edit connection. For Drupal you can change Site Name, Content Type and Language Code. A new password can't be entered there. Contact the UP-TO-DATE support team before disconnecting a site with existing posts, because disconnecting removes its posts and schedules from the platform.
Common errors
Drupal errors appear in the form as "Error: Request failed with status code" followed by a number.
Status code | What it usually means |
|---|---|
404 | The API Prefix is wrong, JSON:API isn't enabled, or the content type name is wrong. |
401 | Wrong username or password, or HTTP Basic Authentication isn't enabled. |
403 | The user may not create or delete this content type, or JSON:API only allows reading. |
422 | Drupal refused the test article, often because the content type has other required fields or no body field. |
500 | The site couldn't be reached or took too long. Check the URL and try again. |