EvelabInsight
    • Signature Generation
    • EveLab Insight - Skin Analysis API for All Ethnicities
      • Obtain access_token
        GET
      • Facial attribute analysis
        POST
      • Facial pose analysis
        POST
      • Skin analysis
        POST
    • EveLab Insight - Basic Data API
      • Basic Data API (Universal Edition) v1.6
    • EveLab Insight - Report API
      • Push Data API
        POST
      • Pull Data API
        GET
    • EveLab Insight - CRM API
      • Search customers
        GET

    Signature Generation

    Example#

    Suppose the following request parameters are used:
    ParameterValue
    app_idqnFDyq7dGYduSGuQFH7lwu2AawyuV3OL
    app_secretPpNS8GsTOpo8tTXpDIqR0rU4Lmil3psP
    begin1605456000
    end1605542400
    data_typereport
    limit20
    source_typeeve
    sig_time1605579971
    This request queries:
    Report type: report
    Time range: 2020-11-16 00:00:00 ~ 2020-11-17 00:00:00
    Page size: 20

    Step 1. Determine Parameters to Sign#

    Include all request parameters except sig.
    Parameters used in this example:
    app_id
    begin
    data_type
    end
    limit
    sig_time
    source_type

    Step 2. Sort Parameters#

    Sort all parameter names in ascending ASCII (lexicographical) order.
    Sorted result:
    app_id
    begin
    data_type
    end
    limit
    sig_time
    source_type

    Step 3. Build the Parameter String#

    Concatenate the sorted parameters using the following format:
    key1=value1&key2=value2&key3=value3...
    Result:
    app_id=qnFDyq7dGYduSGuQFH7lwu2AawyuV3OL&begin=1605456000&data_type=report&end=1605542400&limit=20&sig_time=1605579971&source_type=eve

    Step 4. Append app_secret#

    Append the app_secret directly to the end of the parameter string.
    Do not add & or any other separator.
    Final string to sign:
    app_id=qnFDyq7dGYduSGuQFH7lwu2AawyuV3OL&begin=1605456000&data_type=report&end=1605542400&limit=20&sig_time=1605579971&source_type=evePpNS8GsTOpo8tTXpDIqR0rU4Lmil3psP

    Step 5. Calculate MD5#

    Calculate the MD5 hash of the final string.
    Result:
    dbb6ad9955f84cdf6621c96cb22ca781
    This value should be used as the request's sig parameter.

    Final Request#

    app_id=qnFDyq7dGYduSGuQFH7lwu2AawyuV3OL
    begin=1605456000
    end=1605542400
    data_type=report
    limit=20
    source_type=eve
    sig_time=1605579971
    sig=dbb6ad9955f84cdf6621c96cb22ca781

    Java Example#


    PHP Example#


    Python Example#


    JavaScript (Node.js) Example#


    Go Example#


    Notes#

    1.
    Exclude the sig parameter when generating the signature.
    2.
    Sort all parameter names in ascending ASCII (lexicographical) order.
    3.
    Concatenate parameters using &.
    4.
    Append app_secret directly to the end of the parameter string without any separator.
    5.
    Use UTF-8 encoding before calculating the MD5 hash.
    6.
    The generated MD5 value is case-insensitive, although lowercase is recommended.
    7.
    The parameter values used for signing must exactly match the values sent in the request.
    Next
    Obtain access_token
    Built with