Create Usage Plan and Key

Last updated: 2019-07-09 18:47:54

PDF

After a service is published, you must create a usage plan and a key and bind them to the service before you can call it successfully.

  1. Create a pair of secret_id + secret_key.
    (1) Go to the Key tab, and click New.
    Key List
    (2) Enter the key name, and click Submit.
    Create a Key

  2. Create a usage plan.
    (1) Go to the Usage Plan tab, and click New.
    Usage plan list
    (2) Edit the usage plan, and click Finish.
    Create a usage plan

  3. Bind the created secret_id + secret_key in the Usage Plan tab.
    (1) Go to the Usage Plan tab, and select the created service.
    (2) Click Bind Key.
    Bind a key
    (3) Bind the created secret_id + secret_key in the Usage Plan tab, and click Submit.
    Bind a key

  4. Bind the usage plan to a service environment.
    (1) Go to the Usage Plan tab, and select the created service.
    (2) Go to the Bound Environment page, and click Bind Service Environment.
    (3) Enter the service and the environment to be bound, and click Submit.
    Enter the environment to be bound to

    Note: If two usage plans are to be bound to the same environment, the two usage plans cannot be bound to the same key.

  5. After the steps above are completed, you can provide the secret_id + secret_key created in Step 1 to end users. End users can obtain the verification using the secret_id + secret_key, and then access the API published in the service via the secondary domain name of the service or by binding a private domain name.