· 5 years ago · Jun 29, 2020, 01:16 PM
1Most functions require at least an api_dev_key parameter. Functions for manipulating your pastes through the
2API require an api_user_key.
3Instantiate a Pastebin Object
4Parameters api_dev_key (string) – Your API Pastebin key
5authenticate(username, password)
6Authenticate through the API login endpoint Your api_user_key attribute is set automatically
7Parameters
8• username (string) – Your username
9• password (string) – Your password
10Returns your user_id key
11Return type string
12create_paste(api_paste_code, api_paste_private=0, api_paste_name=None,
13api_paste_expire_date=None, api_paste_format=None)
14Create a new paste if succesfull return it’s url.
15Parameters
16• api_paste_code (string) – your paste text
17• api_paste_private (int) – valid values=0(public),1(unlisted),2(private)
18• api_user_name – your paste name
19• api_paste_expire_date (string) – check documentation for valid values
20• api_paste_format (string) – check documentation for valid values
21Returns new paste url
22Return type string
23create_paste_from_file(filepath, api_paste_private=0, api_paste_name=None,
24api_paste_expire_date=None, api_past