Help Center> Object Storage Service> SDK Reference> PHP> Quick Start> Setting Up an OBS Environment

Setting Up an OBS Environment

If you have any questions during development, post them on the Issues page of GitHub. For details about parameters and usage of each API, see the API Reference

  1. Sign up a cloud service account.

    Before using OBS, ensure that you have a cloud service account.

    1. Open a browser.
    2. Log in at www.huaweicloud.com/en-us/.
    3. In the upper right corner of the page, click Register.
    4. Enter the registration information and click Agree to Terms and Register.

  2. Enable OBS.

    You are required to recharge your account before using OBS.

    1. Log in to OBS Console.
    2. In the upper right corner of the page, click the username and select User Center. The User Center page is displayed.
    3. Click Recharge. The dialog box for recharging is displayed.
    4. Top up the account as prompted.
    5. After the recharging is complete, close the dialog box and go back to the management console homepage.
    6. On the homepage, click Object Storage Service to enable the OBS service and log in to OBS Console.

  3. Create an AK and SK.

    OBS employs access keys (AK and SK) in user accounts for signature verification to ensure that only authorized accounts can access specified OBS resources. Detailed explanations are as follows:

    • An AK is an Access Key ID on OBS. One AK maps to only one user but one user can have multiple AKs. OBS recognizes users by their AKs.
    • An SK is the Secret Access Key on OBS, which is required as the key to access OBS. You can generate authentication information based on SKs and request header fields. SKs and AKs are in one-to-one mapping.

    The procedure is as follows:

    1. Log in to OBS Console.
    2. In the upper right corner, hover the cursor over the username and choose My Credentials.
    3. On the My Credentials page, select Access Keys in the navigation pane on the left.
    4. On the Access Keys page, click Create Access Key.
    5. In the Add Access Key dialog box that is displayed, enter the password and its verification code.
      • If you have not bound an email address or mobile number, you need to enter only the password.
      • If you have bound an email address and a mobile number, you can select the verification either by email address or mobile number.
    6. Click OK.
    7. In the Download Access Key dialog box that is displayed, click OK to save the access keys to your browser's default download path.
    8. Open the downloaded credentials.csv file to obtain the access keys (AK and SK).
    • Each user can create up to two valid AK and SK pairs.
    • To prevent the AK from being leaked, keep it secure. If you click Cancel in the dialog box, the AKs will not be downloaded, and you cannot download them later. You can re-create an AK if you need to use it.