using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FlexJobApi.Core.Utils.WxmpUtils
{
///
/// 微信小程序获取接口调用凭据
///
public class WxmpGetAccessTokenRequest
{
///
/// 填写 client_credential
///
[JsonProperty("grant_type")]
public string GrantType { get; set; } = "client_credential";
///
/// 小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态
///
[JsonProperty("appid")]
public string Appid { get; set; }
///
/// 小程序唯一凭证密钥,即 AppSecret,获取方式同 appid
///
[JsonProperty("secret")]
public string Secret { get; set; }
}
///
/// 微信小程序获取接口调用凭据-结果
///
public class WxmpGetAccessTokenResponse
{
///
/// 获取到的凭证
///
[JsonProperty("access_token")]
public string AccessToken { get; set; }
///
/// 凭证有效时间,单位:秒。目前是7200秒之内的值。
///
[JsonProperty("expires_in")]
public int ExpiresIn { get; set; }
}
}