### generateSecurityToken Source: https://openservice.aliexpress.com/doc/api.htm Generates an access token safely for calling APIs. ```APIDOC ## GET/POST /auth/token/security/create ### Description Generates an access token safely for calling APIs. ### Method GET/POST ### Endpoint /auth/token/security/create ### Parameters #### Query Parameters - **code** (String) - Required - oauth code, get from app callback URL - **uuid** (String) - Optional - uuid ### Response #### Success Response (200) - **expires_in** (Number) - The expiring time of the access token, in seconds - **account_id** (String) - Account ID, Allow null. if(account_platform=seller_center) account_id=null - **user_id** (String) - user id - **seller_id** (String) - seller id - **access_token** (String) - Access token - **refresh_token** (String) - Refresh token, used to refresh the token when “refresh_expires_in”>0. - **refresh_expires_in** (Number) - The expiring time of the refresh token - **expire_time** (Number) - expire time - **refresh_token_valid_time** (Number) - refresh token valid time - **sp** (String) - sp - **locale** (String) - locale ### Request Example ```json { "code": "0_2DL4DV3jcU1UOT7WGI1A4rY91", "uuid": "uuid" } ``` ### Response Example ```json { "refresh_token_valid_time": "1437129035362", "code": "0", "expire_time": "1437129035362", "locale": "zh_CN", "access_token": "50000601c30atpedfgu3LVvik87Ixlsvle3mSoB7701ceb156fPunYZ43GBg", "refresh_token": "500016000300bwa2WteaQyfwBMnPxurcA0mXGhQdTt18356663CfcDTYpWoi", "account_id": "7063844", "user_id": "1001", "refresh_expires_in": "60", "expires_in": "10", "sp": "ae", "request_id": "0ba2887315178178017221014", "seller_id": "1001" } ``` ``` -------------------------------- ### Generate Security Token (Java) Source: https://openservice.aliexpress.com/doc/api.htm Use this snippet to generate a security token for API calls. Ensure you have the correct URL, app key, and app secret. The 'code' parameter is mandatory and obtained from the app callback URL. ```java IopClient client = new IopClient(url, appkey, appSecret); IopRequest request = new IopRequest(); request.setApiName("/auth/token/security/create"); request.addApiParameter("code", "0_2DL4DV3jcU1UOT7WGI1A4rY91"); request.addApiParameter("uuid", "uuid"); IopResponse response = client.execute(request, Protocol.GOP); System.out.println(response.getBody()); Thread.sleep(10); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.