PHPackages                             iqual/iq\_hootsuite\_api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. iqual/iq\_hootsuite\_api

ActiveDrupal-module[API Development](/categories/api)

iqual/iq\_hootsuite\_api
========================

Provides integration with the Hootsuite REST API for scheduling messages, managing social profiles, and more.

043↓33.3%PHP

Since Mar 13Pushed 2mo agoCompare

[ Source](https://github.com/iqual-ch/iq_hootsuite_api)[ Packagist](https://packagist.org/packages/iqual/iq_hootsuite_api)[ RSS](/packages/iqual-iq-hootsuite-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

IQ Hootsuite API
================

[](#iq-hootsuite-api)

A Drupal module that provides integration with the [Hootsuite REST API](https://apidocs.hootsuite.com/docs/api/index.html) for scheduling messages, managing social profiles, and more.

Requirements
------------

[](#requirements)

- Drupal 10 / 11
- PHP 8.1+
- Guzzle HTTP client (included with Drupal core)

Installation
------------

[](#installation)

1. Place the module in your `modules/custom` or `modules/contrib` directory.
2. Enable the module: ```
    drush en iq_hootsuite_api
    ```

Configuration
-------------

[](#configuration)

1. Navigate to **Administration &gt; Configuration &gt; Web services &gt; Hootsuite API Settings**(/admin/config/services/iq\_hootsuite\_api).
2. Enter your **Client ID** and **Client Secret** from the [Hootsuite Developer Portal](https://developer.hootsuite.com).
3. The OAuth2 and API endpoints are pre-filled with Hootsuite defaults. Adjust only if needed.
4. Save the configuration, then click the authentication link to complete the OAuth2 flow.

### OAuth2 Authentication

[](#oauth2-authentication)

The module uses the OAuth2 authorization code flow:

1. A user with the *Administer Hootsuite API settings* permission initiates authentication from the settings page.
2. The user is redirected to Hootsuite to grant access.
3. Hootsuite redirects back to /iq\_hootsuite\_api/callback with an authorization code.
4. The module exchanges the code for access and refresh tokens, stored securely in Drupal's State API.
5. Tokens are automatically refreshed when they expire.

Usage
-----

[](#usage)

The module exposes a service iq\_hootsuite\_api.client that can be injected into your custom code.

### Dependency injection (recommended)

[](#dependency-injection-recommended)

In your my\_module.services.yml:

```
services:
  my_module.my_service:
    class: Drupal\my_module\Service\MyService
    arguments:
      - '@iq_hootsuite_api.client'

```

In your service class:

```
use Drupal\iq_hootsuite_api\Service\HootsuiteApiClientInterface;

class MyService {
  public function __construct(
    protected HootsuiteApiClientInterface $hootsuiteClient,
  ) {}
}

```

### Available methods

[](#available-methods)

MethodDescriptiongetMe()Retrieve the authenticated member's infogetSocialProfiles()List accessible social profilesscheduleMessage($text, $profileIds, $time, $options)Schedule a message to social profilesgetMessage($messageId)Retrieve a specific messagegetMessages($startTime, $endTime, $options)List outbound messages in a date rangedeleteMessage($messageId)Delete a messagecreateMediaUploadUrl($sizeBytes, $mimeType)Get an S3 upload URL for mediarequest($method, $endpoint, $query, $body)Make any authenticated API requestgetEndpointUrl($name)Build a full URL from a configured endpoint namegetHttpClient()Access the underlying Guzzle HTTP client### Examples

[](#examples)

```
$client = \Drupal::service('iq_hootsuite_api.client');

// Get authenticated user info.
$me = $client->getMe();

// List social profiles.
$profiles = $client->getSocialProfiles();

// Schedule a message.
$result = $client->scheduleMessage(
  'Check out our latest post!',
  ['115185509'],
  '2026-04-01T14:00:00Z',
  ['tags' => ['campaign_spring']],
);

// Retrieve messages from the last 7 days.
$messages = $client->getMessages(
  '2026-02-23T00:00:00Z',
  '2026-03-02T00:00:00Z',
  ['state' => 'SCHEDULED', 'limit' => 10],
);

// Generic API call.
$team = $client->request(
  'GET',
  $client->getEndpointUrl('organizations') . '/626731/teams'
);

```

Permissions
-----------

[](#permissions)

PermissionDescription*Administer Hootsuite API settings*Access the configuration form and OAuth2 callbackAPI Reference
-------------

[](#api-reference)

This module wraps the [Hootsuite REST API v1](https://apidocs.hootsuite.com/docs/api/index.html). Refer to the official documentation for full details on request/response formats.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance58

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/43082de1b2e2b2b2d48b7ff7dbc7c60ff1d0a015123d4062ac0b49ea0b3b725f?d=identicon)[iqual](/maintainers/iqual)

---

Top Contributors

[![youpixxl](https://avatars.githubusercontent.com/u/3398689?v=4)](https://github.com/youpixxl "youpixxl (15 commits)")

### Embed Badge

![Health badge](/badges/iqual-iq-hootsuite-api/health.svg)

```
[![Health](https://phpackages.com/badges/iqual-iq-hootsuite-api/health.svg)](https://phpackages.com/packages/iqual-iq-hootsuite-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
