Skip to content

Added getting started and authentication page#224

Open
MutiatBash wants to merge 14 commits intomautic:5.xfrom
MutiatBash:rest-api-getting-started-page
Open

Added getting started and authentication page#224
MutiatBash wants to merge 14 commits intomautic:5.xfrom
MutiatBash:rest-api-getting-started-page

Conversation

@MutiatBash
Copy link

No description provided.

Copy link
Member

@RCheesley RCheesley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @MutiatBash - I've made a few comments but proper reviewing is blocked by #225 which is required to unblock building locally. I'm also noticing that Vale isn't checking this page correctly so we might need to check that, too.

Copy link
Member

@RCheesley RCheesley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MutiatBash a small Vale fix here, too.

@RCheesley RCheesley added documentation Improvements or additions to documentation pending-feedback labels Oct 24, 2024
@MutiatBash
Copy link
Author

@RCheesley .....I've made the suggested changes, can you review them

Copy link
Member

@RCheesley RCheesley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the great work @MutiatBash - just a few small tweaks to fix then it should be good to merge!

@RCheesley
Copy link
Member

Hi @MutiatBash give us a shout when you're ready for a re-review - it's helpful if you can mark the conversation resolved once you fix each item. Thanks!

@adiati98 adiati98 requested a review from a team as a code owner January 11, 2026 09:16
@adiati98 adiati98 requested review from adiati98 and favour-chibueze and removed request for a team January 11, 2026 09:16
Copy link
Member

@RCheesley RCheesley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of small points to address with this one.

@RCheesley
Copy link
Member

When this goes to 7 let's ensure we add an admonition about API v2 on the getting started page. Also, can we ensure this is first in the TOC, or near the top?

adiati98 and others added 2 commits January 20, 2026 07:29
@adiati98
Copy link
Contributor

adiati98 commented Jan 20, 2026

When this goes to 7 let's ensure we add an admonition about API v2 on the getting started page. Also, can we ensure this is first in the TOC, or near the top?

  • The Getting Started page is to get started with API. It's already on the top of TOC of REST API. I don't think if we move this to the top of TOC (above Development Environment), it'll make sense.

    Screenshot 2026-01-20 115353
  • Can you please suggest a copy for admonition for API V2? I'm not sure what to point here. Do we want to point that we now have V2 or something else?

@adiati98
Copy link
Contributor

adiati98 commented Jan 21, 2026

@mautic/core-team I'd like to confirm some things.

Getting started

The "Getting started" page in this PR is combinations of the below legacies:

There's one thing here:

  1. The Libraries is now a note admonition in the page, where we point folks to the api-library repository. In other word, the Libraries page is skipped. Do we want this?

Here's the link to the live preview: https://mautic-developer--224.org.readthedocs.build/en/224/rest_api/getting_started.html

Authentication

The "Authentication" page in this PR is combinations of the below legacies:

There are several things here:

  1. Should we keep "Authorization" as title, or are we okay with "Authentication"? But we might need to be consistence here. Because one of the subsections in the legacy is Basic Authentication. We might want to review when to use which one.
  2. The OAuth 1a section is skipped. Do we still need this? If so, we need to put it back here.
  3. The contents are slightly different with the original. Perhaps to update things as they're now combined? However, I can't confirm if they're valid, as some subsections are new. Therefore, I need you to review the content.

Here's the link to the live preview: https://mautic-developer--224.org.readthedocs.build/en/224/rest_api/authentication.html

TIA! ✨

Comment on lines +20 to +45
.. code-block:: php

<?php

use GuzzleHttp\Client;
use Mautic\Auth\ApiAuth;
use Mautic\MauticApi;

// Initiate an HTTP Client
$httpClient = new Client([
'timeout' => 10,
]);

// Initiate the auth object
$settings = [
'userName' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD'
];
$apiUrl = 'https://mautic.example.com';

$initAuth = new ApiAuth($httpClient);
$auth = $initAuth->newAuth($settings, 'BasicAuth');

$api = new MauticApi();
$contactsApi = $api->newApi('contacts', $auth, $apiUrl);
$contacts = $contactsApi->getList();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mautic/core-team I don't see this code-block anywhere in the legacy docs. Is this valid?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just link to https://github.com/mautic/api-library?tab=readme-ov-file#installing-the-api-library which will always have the up to date example?

@adiati98 adiati98 moved this to 🔎 In review in Mautic's No/Low/Code Tasks Jan 25, 2026
@adiati98 adiati98 moved this from 🔎 In review to 🕰️ In progress in Mautic's No/Low/Code Tasks Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation hacktoberfest-accepted pending-feedback

Projects

Status: 🕰️ In progress

Development

Successfully merging this pull request may close these issues.

4 participants