I would like to create and edit pages on Telegram's telegraph.ph website through telegraph API.
https://telegra.ph/api#createPage
To do so, I need to know the access token of the telegraph account. I've been searching high and low using Google how to do it but still can't find any answer.
I am using telegraph python library.
https://github.com/python273/telegraph
I am using python 3.7
The API endpoint you're looking for is createAccount. Invoking this endpoint returns an object containing an accesstoken.
From the docs:
Having said that, the library you've mentioned makes it much easier to work with the api. You don't even to know the
access_tokenexplicitly. You only need to call.create_account()and the library will manage the token internally (see here and here to know how).Here is a sample code on how to use the lib to create an account and utilize it: