tencent cloud

Feedback

Last updated: 2023-12-22 10:06:26

    Overview

    This document describes how to manage access to your APIs through application authentication in Java.

    Directions

    1. In the API Gateway console, create an API and select the authentication type as App authentication. To learn more about the authentication types, find the documentation for different types of backends in Creating API - Overview.
    2. Release the service where the API resides to an environment. See Service Release and Deactivation.
    3. Create an application on the Application page in the console.
    4. Select the created application in the application list, click Bind API, select the service and API, and click Submit to bind the application to the API.
    5. Generate signing information in Java by referring to the Sample Code.

    Environmental Dependencies

    API Gateway provides sample codes with the request body in JSON format and form-data format. Select as needed.
    Application authentication in the Java demo needs to introduce the following external dependency:
    <dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpclient</artifactId>
    <version>4.5.13</version>
    </dependency>
    <dependency>
    <groupId>commons-codec</groupId>
    <artifactId>commons-codec</artifactId>
    <version>1.11</version>
    </dependency>

    Notes

    For more information on operations such as application lifecycle management, authorizing an app to access the API, and binding an app to an API, see Application Management.
    For the application signature generation process, see Application Authentication.

    Sample Code

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support