PHPackages                             huaweicloud/huaweicloud-sdk-php - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. huaweicloud/huaweicloud-sdk-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

huaweicloud/huaweicloud-sdk-php
===============================

Huawei Cloud SDK for PHP

3.1.185(1mo ago)1829.2k—6.3%13[8 issues](https://github.com/huaweicloud/huaweicloud-sdk-php-v3/issues)[4 PRs](https://github.com/huaweicloud/huaweicloud-sdk-php-v3/pulls)2Apache-2.0PHPPHP &gt;=5.6.0

Since Nov 24Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/huaweicloud/huaweicloud-sdk-php-v3)[ Packagist](https://packagist.org/packages/huaweicloud/huaweicloud-sdk-php)[ RSS](/packages/huaweicloud-huaweicloud-sdk-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (247)Used By (2)

English | [简体中文](./README_CN.md)

[![](https://camo.githubusercontent.com/725ea9e81b1ebeb0c1bc0deb63e20b847284c3ac6d760255260abf491d878903/68747470733a2f2f636f6e736f6c652d7374617469632e687561776569636c6f75642e636f6d2f7374617469632f6175746875692f32303231303230323131353133352f7075626c69632f637573746f6d2f696d616765732f6c6f676f2d656e2e737667)](https://www.huaweicloud.com/)

Huawei Cloud Php Software Development Kit (Php SDK)
===================================================

[](#huawei-cloud-php-software-development-kit-php-sdk)

[![GitHub Release](https://camo.githubusercontent.com/22899be54b61045db47eb17df5b7bfa88724aee283f00305de72be6f0fafd33a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f687561776569636c6f75642f687561776569636c6f75642d73646b2d7068702d7633)](https://github.com/huaweicloud/huaweicloud-sdk-php-v3/releases)[![License](https://camo.githubusercontent.com/113834f5ab129dd286ad023226e931a6dbee8998dfaa3dd524eceee9b8ecdbbd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4170616368652d2d322e302d677265656e)](https://www.apache.org/licenses/LICENSE-2.0)

The Huawei Cloud Php SDK allows you to easily work with Huawei Cloud services such as Elastic Compute Service (ECS) and Virtual Private Cloud(VPC) without the need to handle API related tasks.

This document introduces how to obtain and use Huawei Cloud Php SDK.

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

[](#requirements)

- To use Huawei Cloud Php SDK, you must have Huawei Cloud account as well as the Access Key (AK) and Secret key (SK) of the Huawei Cloud account. You can create an Access Key in the Huawei Cloud console. For more information, see [My Credentials](https://support.huaweicloud.com/en-us/usermanual-ca/en-us_topic_0046606340.html).
- To use Huawei Cloud Php SDK to access the APIs of specific service, please make sure you do have activated the service in [Huawei Cloud console](https://console.huaweicloud.com/?locale=en-us) if needed.
- Huawei Cloud Php SDK requires **PHP 5.6** or later, run command `php --version` to check the version of Php.

Install Php SDK
---------------

[](#install-php-sdk)

The recommended way to install SDK is with [Composer](https://getcomposer.org/).

Composer is a dependency management tool for Php which allows you to declare the dependencies your project needs and installs them into your project.

```
# Install Composer
curl -sS https://getcomposer.org/installer | php

# Install the Php SDK
composer require huaweicloud/huaweicloud-sdk-php:3.0.3-beta
```

After installing, you need to require Composer's autoloader:

```
require 'path/to/vendor/autoload.php';
```

You can get the SDK version information through [SDK center](https://console-intl.huaweicloud.com/apiexplorer/#/sdkcenter?language=PHP) or [Packagist](https://packagist.org/packages/huaweicloud/huaweicloud-sdk-php).

Code example
------------

[](#code-example)

- The following example shows how to query a list of IAM in a specific region, you need to substitute your real `{Service}Client` for `IamClient` in actual use.
- Substitute the values for `{your ak string}`, `{your sk string}`, `{your endpoint string}` and `{your domain id}`.

```
