PHPackages                             concrete5/community\_api\_client - 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. concrete5/community\_api\_client

Abandoned → [concretecms/community\_api\_client](/?search=concretecms%2Fcommunity_api_client)Library[API Development](/categories/api)

concrete5/community\_api\_client
================================

This package contains an api client that is able to connect with the community.

015PHP

Since May 19Pushed 3y ago3 watchersCompare

[ Source](https://github.com/concretecms/community_api_client)[ Packagist](https://packagist.org/packages/concrete5/community_api_client)[ RSS](/packages/concrete5-community-api-client/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Community Api Client
====================

[](#community-api-client)

This is the official api client that is used to communicate with the community site.

Currently the functionality is very limited but it get's extended soon.

You can use the api client to assign achievements.

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

[](#requirements)

- PHP 7.1
- Can only run within Concrete CMS context

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

[](#installation)

The Community API client can be installed using Composer.

Composer To install run `composer require concrete5/community_api_client`

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

[](#configuration)

There is no interface for configure the api client. However there are multiple options to do that.

### Option 1: Programmatically

[](#option-1-programmatically)

If you want to setup the credentials programmatically you can do so like this:

```
use Concrete\Core\Support\Facade\Application;
use PortlandLabs\CommunityApiClient\ApiClient;

/** @var ApiClient $apiClient */
$apiClient = $app->make(ApiClient::class);
$apiClient
    ->setEndpoint("your_endpoint")
    ->setClientId("your_client_id")
    ->setClientSecret("your_client_secret");
```

### Option 2: With a configuration file

[](#option-2-with-a-configuration-file)

You can also take use of an configuration file.

All you need to do is creating a file located at `application/config/community_api_client.php` with the following content:

```
