Closed fukemy closed 3 months ago
I tested with mini app version from MacOS but still can not get photoUrl
Because it should be photo_url
.
i checked initData but can not find this, no photo_url even I have this
Mocking init data, you must use this data:
const initDataRaw = new URLSearchParams([
['user', JSON.stringify({
id: -99281932,
first_name: 'Andrew',
last_name: 'Rogue',
username: 'rogue',
language_code: 'en',
is_premium: false,
photo_url: 'https://avatars.githubusercontent.com/u/8202437',
allows_write_to_pm: true,
})],
['hash', '89d6079ad6762351f38c6dbbc41bb53048019256a9443988af7a48bcad16ba31'],
['auth_date', '1716922846'],
['start_param', 'debug'],
['chat_type', 'sender'],
['chat_instance', '8428209589180549439'],
]).toString();
Anyways, why do you need it? It is only accessible to Telegram partners
Telegram Application
Other
Describe the Bug
I follow the website document:
But when get initData, I can not see the photoUrl. Tried with clear cache, delete .next folder(NextJS)...
To Reproduce
Steps to reproduce the behavior:
https://docs.telegram-mini-apps.com/packages/telegram-apps-sdk/environment
Expected Behavior
I want to get photoUrl with mockTelegramEnv