Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 4cs = 4CS
- 6502acme = 6502 ACME Cross Assembler
- 6502kickass = 6502 Kick Assembler
- 6502tasm = 6502 TASM/64TASS
- abap = ABAP
- actionscript = ActionScript
- actionscript3 = ActionScript 3
- ada = Ada
- aimms = AIMMS
- algol68 = ALGOL 68
- apache = Apache Log
- applescript = AppleScript
- apt_sources = APT Sources
- arm = ARM
- asm = ASM (NASM)
- asp = ASP
- asymptote = Asymptote
- autoconf = autoconf
- autohotkey = Autohotkey
- autoit = AutoIt
- avisynth = Avisynth
- awk = Awk
- bascomavr = BASCOM AVR
- bash = Bash
- basic4gl = Basic4GL
- dos = Batch
- bibtex = BibTeX
- blitzbasic = Blitz Basic
- b3d = Blitz3D
- bmx = BlitzMax
- bnf = BNF
- boo = BOO
- bf = BrainFuck
- c = C
- c_winapi = C (WinAPI)
- c_mac = C for Macs
- cil = C Intermediate Language
- csharp = C#
- cpp = C++
- cpp-winapi = C++ (WinAPI)
- cpp-qt = C++ (with Qt extensions)
- c_loadrunner = C: Loadrunner
- caddcl = CAD DCL
- cadlisp = CAD Lisp
- cfdg = CFDG
- chaiscript = ChaiScript
- chapel = Chapel
- clojure = Clojure
- klonec = Clone C
- klonecpp = Clone C++
- cmake = CMake
- cobol = COBOL
- coffeescript = CoffeeScript
- cfm = ColdFusion
- css = CSS
- cuesheet = Cuesheet
- d = D
- dart = Dart
- dcl = DCL
- dcpu16 = DCPU-16
- dcs = DCS
- delphi = Delphi
- oxygene = Delphi Prism (Oxygene)
- diff = Diff
- div = DIV
- dot = DOT
- e = E
- ezt = Easytrieve
- ecmascript = ECMAScript
- eiffel = Eiffel
- email = Email
- epc = EPC
- erlang = Erlang
- fsharp = F#
- falcon = Falcon
- fo = FO Language
- f1 = Formula One
- fortran = Fortran
- freebasic = FreeBasic
- freeswitch = FreeSWITCH
- gambas = GAMBAS
- gml = Game Maker
- gdb = GDB
- genero = Genero
- genie = Genie
- gettext = GetText
- go = Go
- groovy = Groovy
- gwbasic = GwBasic
- haskell = Haskell
- haxe = Haxe
- hicest = HicEst
- hq9plus = HQ9 Plus
- html4strict = HTML
- html5 = HTML 5
- icon = Icon
- idl = IDL
- ini = INI file
- inno = Inno Script
- intercal = INTERCAL
- io = IO
- ispfpanel = ISPF Panel Definition
- j = J
- java = Java
- java5 = Java 5
- javascript = JavaScript
- jcl = JCL
- jquery = jQuery
- json = JSON
- julia = Julia
- kixtart = KiXtart
- latex = Latex
- ldif = LDIF
- lb = Liberty BASIC
- lsl2 = Linden Scripting
- lisp = Lisp
- llvm = LLVM
- locobasic = Loco Basic
- logtalk = Logtalk
- lolcode = LOL Code
- lotusformulas = Lotus Formulas
- lotusscript = Lotus Script
- lscript = LScript
- lua = Lua
- m68k = M68000 Assembler
- magiksf = MagikSF
- make = Make
- mapbasic = MapBasic
- matlab = MatLab
- mirc = mIRC
- mmix = MIX Assembler
- modula2 = Modula 2
- modula3 = Modula 3
- 68000devpac = Motorola 68000 HiSoft Dev
- mpasm = MPASM
- mxml = MXML
- mysql = MySQL
- nagios = Nagios
- netrexx = NetRexx
- newlisp = newLISP
- nginx = Nginx
- nimrod = Nimrod
- text = None
- nsis = NullSoft Installer
- oberon2 = Oberon 2
- objeck = Objeck Programming Langua
- objc = Objective C
- ocaml-brief = OCalm Brief
- ocaml = OCaml
- octave = Octave
- pf = OpenBSD PACKET FILTER
- glsl = OpenGL Shading
- oobas = Openoffice BASIC
- oracle11 = Oracle 11
- oracle8 = Oracle 8
- oz = Oz
- parasail = ParaSail
- parigp = PARI/GP
- pascal = Pascal
- pawn = Pawn
- pcre = PCRE
- per = Per
- perl = Perl
- perl6 = Perl 6
- php = PHP
- php-brief = PHP Brief
- pic16 = Pic 16
- pike = Pike
- pixelbender = Pixel Bender
- plsql = PL/SQL
- postgresql = PostgreSQL
- postscript = PostScript
- povray = POV-Ray
- powershell = Power Shell
- powerbuilder = PowerBuilder
- proftpd = ProFTPd
- progress = Progress
- prolog = Prolog
- properties = Properties
- providex = ProvideX
- puppet = Puppet
- purebasic = PureBasic
- pycon = PyCon
- python = Python
- pys60 = Python for S60
- q = q/kdb+
- qbasic = QBasic
- qml = QML
- rsplus = R
- racket = Racket
- rails = Rails
- rbs = RBScript
- rebol = REBOL
- reg = REG
- rexx = Rexx
- robots = Robots
- rpmspec = RPM Spec
- ruby = Ruby
- gnuplot = Ruby Gnuplot
- rust = Rust
- sas = SAS
- scala = Scala
- scheme = Scheme
- scilab = Scilab
- scl = SCL
- sdlbasic = SdlBasic
- smalltalk = Smalltalk
- smarty = Smarty
- spark = SPARK
- sparql = SPARQL
- sqf = SQF
- sql = SQL
- standardml = StandardML
- stonescript = StoneScript
- sclang = SuperCollider
- swift = Swift
- systemverilog = SystemVerilog
- tsql = T-SQL
- tcl = TCL
- teraterm = Tera Term
- thinbasic = thinBasic
- typoscript = TypoScript
- unicon = Unicon
- uscript = UnrealScript
- ups = UPC
- urbi = Urbi
- vala = Vala
- vbnet = VB.NET
- vbscript = VBScript
- vedit = Vedit
- verilog = VeriLog
- vhdl = VHDL
- vim = VIM
- visualprolog = Visual Pro Log
- vb = VisualBasic
- visualfoxpro = VisualFoxPro
- whitespace = WhiteSpace
- whois = WHOIS
- winbatch = Winbatch
- xbasic = XBasic
- xml = XML
- xorg_conf = Xorg Config
- xpp = XPP
- yaml = YAML
- z80 = Z80 Assembler
- zxbasic = ZXBasic
- Creating A New Paste, The 'api_paste_expire_date' Paramater In Detail
- We have 7 valid values available which you can use with the 'api_paste_expire_date' parameter:
- N = Never
- 10M = 10 Minutes
- 1H = 1 Hour
- 1D = 1 Day
- 1W = 1 Week
- 2W = 2 Weeks
- 1M = 1 Month
- Creating A New Paste, The 'api_paste_private' Paramater In Detail
- We have 3 valid values available which you can use with the 'api_paste_private' parameter:
- 0 = Public
- 1 = Unlisted
- 2 = Private (only allowed in combination with api_user_key, as you have to be logged into your account to access the paste)
- Creating An 'api_user_key' Using The API Member Login System
- With this API we allow you to create applications which use the Pastebin members system. Sending a valid POST request to our API login system will return a unique user session key which can then be used to create a paste as a logged in user for example. Please send a POST request to the link shown below:
- http://pastebin.com/api/api_login.php
- Include all the following POST parameters when you request the URL:
- 1. api_dev_key - this is your API Developer Key, in your case: YOUR API DEVELOPER KEY
- 2. api_user_name - this is the username of the user you want to login.
- 3. api_user_password - this is the password of the user you want to login.
- If all 3 values match, a valid user session key will be returned. This key can be used as the 'api_user_key' paramater. Multiple keys can be active at the same time for the same user. We do this to allow people to be signed in at multiple locations at once. The api_user_key does not expire.
- Below is a PHP example using cURL how to create a valid 'api_user_key':
- $api_dev_key = 'YOUR API DEVELOPER KEY';
- $api_user_name = 'a_users_username';
- $api_user_password = 'a_users_password';
- $api_user_name = urlencode($api_user_name);
- $api_user_password = urlencode($api_user_password);
- $url = 'http://pastebin.com/api/api_login.php';
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_dev_key='.$api_dev_key.'&api_user_name='.$api_user_name.'&api_user_password='.$api_user_password.'');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
- $response = curl_exec($ch);
- echo $response;
- Possible Good API Responses: (example)
- 6c6d3fe13b19bbd6e479b705df0a607f
- Possible Bad API Responses:
- Bad API request, use POST request, not GET
- Bad API request, invalid api_dev_key
- Bad API request, invalid login
- Bad API request, account not active
- Bad API request, invalid POST parameters
- If you quickly need to set just one api_user_key, you can use this form to generate one.
- Listing Pastes Created By A User
- With this API you can list all the pastes created by a certain user. You will need send a valid POST request to the URL below to access the data:
- http://pastebin.com/api/api_post.php
- Include all the following POST parameters when you request the URL:
- 1. api_dev_key - this is your API Developer Key, in your case: YOUR API DEVELOPER KEY
- 2. api_user_key - this is the session key of the logged in user. How to obtain such a key
- 3. api_results_limit - this is not required, by default its set to 50, min value is 1, max value is 1000
- 4. api_option - set as 'list'
- Below is a PHP example using cURL how to list pastes:
- $api_dev_key = 'YOUR API DEVELOPER KEY';
- $api_user_key = '';
- $api_results_limit = '100';
- $url = 'http://pastebin.com/api/api_post.php';
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_option=list&api_user_key='.$api_user_key.'&api_dev_key='.$api_dev_key.'&api_results_limit='.$api_results_limit.'');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
- $response = curl_exec($ch);
- echo $response;
- Below is an example output of a users paste listing:
- <paste>
- <paste_key>0b42rwhf</paste_key>
- <paste_date>1297953260</paste_date>
- <paste_title>javascript test</paste_title>
- <paste_size>15</paste_size>
- <paste_expire_date>1297956860</paste_expire_date>
- <paste_private>0</paste_private>
- <paste_format_long>JavaScript</paste_format_long>
- <paste_format_short>javascript</paste_format_short>
- <paste_url>http://pastebin.com/0b42rwhf</paste_url>
- <paste_hits>15</paste_hits>
- </paste>
- <paste>
- <paste_key>0C343n0d</paste_key>
- <paste_date>1297694343</paste_date>
- <paste_title>Welcome To Pastebin V3</paste_title>
- <paste_size>490</paste_size>
- <paste_expire_date>0</paste_expire_date>
- <paste_private>0</paste_private>
- <paste_format_long>None</paste_format_long>
- <paste_format_short>text</paste_format_short>
- <paste_url>http://pastebin.com/0C343n0d</paste_url>
- <paste_hits>65</paste_hits>
- </paste>
- Other Possible Good API Responses:
- No pastes found.
- Possible Bad API Responses:
- Bad API request, invalid api_option
- Bad API request, invalid api_dev_key
- Bad API request, invalid api_user_key
- Listing Trending Pastes
- With this API you can list the 18 currently trending pastes. You will need send a valid POST request to the URL below to access the data:
- http://pastebin.com/api/api_post.php
- Include all the following POST parameters when you request the URL:
- 1. api_dev_key - this is your API Developer Key, in your case: YOUR API DEVELOPER KEY
- 2. api_option - set as 'trends'
- Below is a PHP example using cURL how to list pastes:
- $api_dev_key = 'YOUR API DEVELOPER KEY';
- $url = 'http://pastebin.com/api/api_post.php';
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_option=trends&api_dev_key='.$api_dev_key.'');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
- $response = curl_exec($ch);
- echo $response;
- Below is an example output of a users paste listing:
- <paste>
- <paste_key>4eWYATXe</paste_key>
- <paste_date>1319458935</paste_date>
- <paste_title>577 French MPs</paste_title>
- <paste_size>29397</paste_size>
- <paste_expire_date>0</paste_expire_date>
- <paste_private>0</paste_private>
- <paste_format_long>None</paste_format_long>
- <paste_format_short>text</paste_format_short>
- <paste_url>http://pastebin.com/4eWYATXe</paste_url>
- <paste_hits>804</paste_hits>
- </paste>
- Possible Bad API Responses:
- Bad API request, invalid api_option
- Bad API request, invalid api_dev_key
- Deleting A Paste Created By A User
- With this API you can delete pastes created by certain users. You will need to send a valid POST request to the URL below to access the data:
- http://pastebin.com/api/api_post.php
- Include all the following POST parameters when you request the URL:
- 1. api_dev_key - this is your API Developer Key, in your case: YOUR API DEVELOPER KEY
- 2. api_user_key - this is the session key of the logged in user. How to obtain such a key
- 3. api_paste_key - this is the unique key of the paste you want to delete.
- 4. api_option - set as 'delete'
- Below is a PHP example using cURL how to create a valid 'api_user_key':
- $api_dev_key = 'YOUR API DEVELOPER KEY';
- $api_user_key = '';
- $api_paste_key = '';
- $url = 'http://pastebin.com/api/api_post.php';
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_option=delete&api_user_key='.$api_user_key.'&api_dev_key='.$api_dev_key.'&api_paste_key='.$api_paste_key.'');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
- $response = curl_exec($ch);
- echo $response;
- Possible Good API Responses:
- Paste Removed
- Possible Bad API Responses:
- Bad API request, invalid api_option
- Bad API request, invalid api_dev_key
- Bad API request, invalid api_user_key
- Bad API request, invalid permission to remove paste
- Getting A Users Information And Settings
- With this API you can obtain a users personal information and certain settings. You will need to send a valid POST request to the URL below to access the data:
- http://pastebin.com/api/api_post.php
- Include all the following POST parameters when you request the URL:
- 1. api_dev_key - this is your API Developer Key, in your case: YOUR API DEVELOPER KEY
- 2. api_user_key - this is the session key of the logged in user. How to obtain such a key
- 3. api_option - set as 'userdetails'
- Below is a PHP example using cURL how to create a valid 'api_user_key':
- $api_dev_key = 'YOUR API DEVELOPER KEY';
- $api_user_key = '';
- $url = 'http://pastebin.com/api/api_post.php';
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_option=userdetails&api_user_key='.$api_user_key.'&api_dev_key='.$api_dev_key.'');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
- $response = curl_exec($ch);
- echo $response;
- Below is an example output of a user information listing:
- <user>
- <user_name>wiz_kitty</user_name>
- <user_format_short>text</user_format_short>
- <user_expiration>N</user_expiration>
- <user_avatar_url>http://pastebin.com/cache/a/1.jpg</user_avatar_url>
- <user_private>1</user_private> (0 Public, 1 Unlisted, 2 Private)
- <user_website>http://myawesomesite.com</user_website>
- <user_email>oh@dear.com</user_email>
- <user_location>New York</user_location>
- <user_account_type>1</user_account_type> (0 normal, 1 PRO)
- </user>
- Possible Bad API Responses:
- Bad API request, invalid api_option
- Bad API request, invalid api_dev_key
- Bad API request, invalid api_user_key
- Getting raw paste output of users pastes including 'private' pastes
- With this API you can obtain the raw paste output of a users pastes, including private pastes:
- http://pastebin.com/api/api_raw.php
- Include all the following POST parameters when you request the URL:
- 1. api_dev_key - this is your API Developer Key, in your case: YOUR API DEVELOPER KEY
- 2. api_user_key - this is the session key of the logged in user. How to obtain such a key
- 3. api_paste_key - this is paste key you want to fetch the data from.
- 4. api_option - set as 'show_paste'
- Below is a PHP example using cURL how to fetch a users raw paste output:
- $api_dev_key = 'YOUR API DEVELOPER KEY';
- $api_user_key = '';
- $url = 'http://pastebin.com/api/api_raw.php';
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_option=show_paste&api_user_key='.$api_user_key.'&api_dev_key='.$api_dev_key.'&api_paste_key=A_VALID_PASTE_KEY_HERE');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
Add Comment
Please, Sign In to add comment