# Call method
```javascript
ttaQrcode(paramsJson, expireHours)
```
# Parameter description
## paramsJson
This parameter is the parameter Json object used to generate the applet code. The sub-properties are as follows:

## expireHours
If this parameter is passed, it means that the QR code image generated in the background will be automatically deleted after this time (hours) to save image storage space in the background.
**Deleting the picture does not affect the normal recognition of the mini program code. Although the picture is deleted, scanning the mini program code saved in the mobile phone album, chat history, and printing is still valid.**
# Give an example
```javascript
const paramsJson = {
appname:'toutiao',
path: 'pages/index/index?inviter_id=123',
}
TTAPI.ttaQrcode(paramsJson, 1).then(res => {
console.log(res)
})
```
**Res data example is as follows:**
```json
{
"code": 0,
"data": "https://dcdn.it120.cc/cuser/951/2020/01/04/6a3b045e-a73e-4367-9adc-cf278c5fae28.png",
"msg": "success"
}
```
The data in the returned information is the image address of the mini program code, which can be displayed on the mini program interface.