微信一些没用的接口地址

<?php
session_start();
$APPID = '';
$APPSECRET = '';
if (empty($_SESSION['access_token'])) {
    $info = json_decode(file_get_contents("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$APPID&secret=$APPSECRET"));
    //获取token
    $access_token = $_SESSION['access_token'] = $info->access_token;
} else {
    $access_token = $_SESSION['access_token'];
}
// 获取ticket
$url = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=$access_token";
$data = '{
    "expire_seconds": 604800, 
    "action_name": "QR_STR_SCENE", 
    "action_info": {
        "scene": {
            "scene_str": "test"
        }
    }
}';
// 通过ticket获取二维码
$url = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=$ticket";
// 删除菜单栏
$url = "https://api.weixin.qq.com/cgi-bin/menu/delete?access_token=$access_token";
// 添加菜单栏
$url = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=$access_token";
$data = '{
    "button": [
        {
            "name": "扫码", 
            "sub_button": [
                {
                    "type": "scancode_waitmsg", 
                    "name": "扫码带提示", 
                    "key": "rselfmenu_0_0", 
                    "sub_button": [ ]
                }, 
                {
                    "type": "scancode_push", 
                    "name": "扫码推事件", 
                    "key": "rselfmenu_0_1", 
                    "sub_button": [ ]
                }
            ]
        }, 
        {
            "name": "发图", 
            "sub_button": [
                {
                    "type": "pic_sysphoto", 
                    "name": "系统拍照发图", 
                    "key": "rselfmenu_1_0", 
                   "sub_button": [ ]
                 }, 
                {
                    "type": "pic_photo_or_album", 
                    "name": "拍照或者相册发图", 
                    "key": "rselfmenu_1_1", 
                    "sub_button": [ ]
                }, 
                {
                    "type": "pic_weixin", 
                    "name": "微信相册发图", 
                    "key": "rselfmenu_1_2", 
                    "sub_button": [ ]
                }
            ]
        }, 
        {
            "name": "发送位置", 
            "type": "location_select", 
            "key": "rselfmenu_2_0"
        }
    ]
}';
// 查看菜单栏
$url = "https://api.weixin.qq.com/cgi-bin/get_current_selfmenu_info?access_token=$access_token";
// 获取openid
$url = "https://api.weixin.qq.com/cgi-bin/user/get?access_token=$access_token&next_openid=";
// 通过该openid获取用户信息
$openid = 'oJhwFt7Izm3wrKq4L_Kuqw8AedNY';
$url = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=$access_token&openid=$openid";
// 获取临时素材
$url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=ksnslmhXhNGp7vHqdhKOr8FNS2FAZH-0k2Ajhh28Slj90OwScuWUkeg2HrHyYkTj";

 

posted @ 2020-06-05 17:22  za_szybko  阅读(193)  评论(0编辑  收藏  举报