View Javadoc
1   package com.foxinmy.weixin4j.mp.type;
2   
3   /**
4    * URL常量类
5    * 
6    * @className URLConsts
7    * @author jinyu(foxinmy@gmail.com)
8    * @date 2014年12月3日
9    * @since JDK 1.6
10   * @see
11   */
12  public final class URLConsts {
13  	public static final String BASE_URL = "https://api.weixin.qq.com/cgi-bin";
14  	/**
15  	 * 公众平台获取token的url
16  	 */
17  	public static final String ASSESS_TOKEN_URL = BASE_URL
18  			+ "/token?grant_type=client_credential&appid=%s&secret=%s";
19  	/**
20  	 * 公众平台jssdk获取token的url
21  	 */
22  	public static final String JS_TICKET_URL = BASE_URL
23  			+ "/ticket/getticket?access_token=%s&type=%s";
24  	/**
25  	 * 开放平台获取token的url
26  	 */
27  	public static final String COMPONENT_TOKEN_URL = BASE_URL
28  			+ "/component/api_component_token";
29  	/**
30  	 * 开放平台获取预授权码的url
31  	 */
32  	public static final String COMPONENET_PRE_CODE_URL = BASE_URL
33  			+ "/component/api_create_preauthcode?component_access_token=%s";
34  	/**
35  	 * 开放平台获取公众号access_token的url
36  	 */
37  	public static final String TOKEN_COMPONENT_URL = BASE_URL
38  			+ "/component/api_authorizer_token?component_access_token=%s";
39  	/**
40  	 * 开放平台oauth授权的url
41  	 */
42  	public static final String COMPONENT_OAUTH_URL = "https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=%s&pre_auth_code=%s&redirect_uri=%s";
43  }