获取小程序全局唯一后台接口调用凭据(access_token
)。调调用绝大多数后台接口时都需使用 access_token。
请求地址
GET https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET
<?php
$appid='wxc换成你的3';
$appsecret='68换成你的cd';
$r = file_get_contents("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$appid&secret=$appsecret");
$data = json_decode($r,true);
echo json_encode($r);
返回值如下: