Telegra.ph is a minimalist publishing tool that allows you to create richly formatted posts and push them to the Web in just a click.
Datatype | Description | Example |
---|---|---|
Datepicker | String which includes date and time | |
Map | String which includes latitude and longitude coma separated | |
List | Simple array | |
Select | String with predefined values | |
Array | Array of objects |
Use this method to create a new Telegraph account.
Field | Type | Description |
---|---|---|
shortName | String | Account name, helps users with several accounts remember which they are currently using. |
authorName | String | Default author name used when creating new articles. |
authorUrl | String | Default profile link, opened when users click on the author’s name below the title. Can be any link, not necessarily to a Telegram profile or channel. |
Use this method to update information about a Telegraph account. Pass only the parameters that you want to edit.
Field | Type | Description |
---|---|---|
accessToken | String | Access token of the Telegraph account. |
shortName | String | New account name, helps users with several accounts remember which they are currently using. |
authorName | String | New author name used when creating new articles. |
authorUrl | String | New profile link, opened when users click on the author’s name below the title. Can be any link, not necessarily to a Telegram profile or channel. |
Use this method to get information about a Telegraph account. Returns an Account object on success.
Field | Type | Description |
---|---|---|
accessToken | String | Access token of the Telegraph account. |
fields | List | List of account fields to return. Available fields: short_name, author_name, author_url, auth_url, page_count. |
Use this method to revoke access_token and generate a new one
Field | Type | Description |
---|---|---|
accessToken | String | Access token of the Telegraph account. |
Use this method to create a new Telegraph page.
Field | Type | Description |
---|---|---|
accessToken | String | Access token of the Telegraph account. |
title | String | Page title. |
authorName | String | Author name, displayed below the article’s title. |
authorUrl | String | Profile link, opened when users click on the author’s name below the title. Can be any link, not necessarily to a Telegram profile or channel. |
content | List | Content of the page. |
returnContent | Select | If true, a content field will be returned in the Page object |
Use this method to edit Telegraph page.
Field | Type | Description |
---|---|---|
accessToken | String | Access token of the Telegraph account. |
path | String | Path to the page. |
title | String | Page title. |
authorName | String | Author name, displayed below the article’s title. |
authorUrl | String | Profile link, opened when users click on the author’s name below the title. Can be any link, not necessarily to a Telegram profile or channel. |
content | List | Content of the page. |
returnContent | Select | If true, a content field will be returned in the Page object |
Use this method to get a Telegraph page.
Field | Type | Description |
---|---|---|
path | String | Path to the page. |
returnContent | Select | If true, a content field will be returned in the Page object |
Use this method to get a list of pages belonging to a Telegraph account.
Field | Type | Description |
---|---|---|
accessToken | String | Access token of the Telegraph account. |
limit | Number | Limits the number of pages to be retrieved. |
offset | Number | Sequential number of the first page to be returned. |
Use this method to get the number of views for a Telegraph article.
Field | Type | Description |
---|---|---|
path | String | Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published). |
year | Number | If passed, the number of page views for the requested year will be returned. |
month | Number | If passed, the number of page views for the requested month will be returned. |
day | Number | If passed, the number of page views for the requested day will be returned. |
hour | Number | If passed, the number of page views for the requested hour will be returned. |