When the official account obtains permanent material (picture), it prompts that media_id is invalid.

upload an image to Wechat server using the new permanent material interface, and then return the media_id, of the image. I saved this media_ia. However, through the access to permanent material interface, when you want to download this picture, you will be prompted that media_id is invalid. What"s going on?

    $token = token();//access_token
    $media_id = "6ucZhqo8frzzRxLxDiM3iW-S9ekqv7pSSVEtfpvok6M";//media_id

    $bgUrl = "https://api.weixin.qq.com/cgi-bin/material/get_material?access_token=".$token;//
    $arr = array(
        "media_id"=>$media_id
    );
    $return = $wxObj->htts_request($bgUrl,$arr);//wxObj
    file_put_contents("bm.txt", $return);
    :40007invalid media_id hint: [roKOwa05051335]
    
   



Php
Apr.11,2021

guess that the ID returned through the API for uploading permanent material is a temporary ID,. You can try whether you can use this ID by downloading temporary material.

the thumb_media_id obtained by querying the permanent material API is the permanent ID of the permanent material


Brother, I also encountered this problem. How did you solve it

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea4ab6-1cfa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea4ab6-1cfa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?