-
Notifications
You must be signed in to change notification settings - Fork 0
Home
DiFi, or the deviantART interactive fragmented interface, is a multi-purpose API that is utilized by deviantART webpages in order to retrieve information as well as sending commands to their servers. Using the DiFi API calls, it is possible to do quite a bit of manipulation with DeviantART, with minimal HTML scraping. Read more…
This Wiki's goal is to document the DeviantART's DiFi protocol as much as possible, by reverse engineering network calls and parsing available source codes.
Most of the described classes and their method calls were discovered by the following combination of methods:
- looking through the javascript files on deviantART, either using grep to find DiFi calls or manually by hand
- using the following filters into Wireshark and surfing dA:
http.request.uri contains "/difi"
data-text-lines contains "DiFi" and data-text-lines contains "status"
- using the Chrome Developer Menu (F12 → Network tab), and either entering
/difi
or filtering XHR requests
The original source code files (that are un-minified and contain comments) are also available. More information on the Reverse-engineering page.
DiFi requests are sent to the /global/difi/
path. The HTTP request verbs are either GET
or POST
, depending on the type of operation (auth-dependent operations always use POST). A list of DiFi call requests are sent in the c[]
parameter; more than one call may be performed per HTTP request. Each call must name an object, a method from the object, and a list of parameters to pass to the method.
The call can be used in order to either request information from the website (e.g. to populate parts of the website), or to perform certain actions on different parts of the website (e.g. giving "favourites").
For more info on the basic protocol, see Protocol.
Most of the public information (and certain actions) can be requested without providing any authentication cookies.
However, accessing user-based information, as well as performing most of the actions on the website requires authentication cookies to be present with the requests.
The auth cookies are shared with the HTML pages, and can only be acquired by doing a bit of HTML scraping and performing an HTTP POST
request.
While the DiFi API was designed to be used internally by the website itself, quite a number of third-party projects exist that make use of the same calls in order to retrieve information or perform actions within the website.
The third-party projects are divided into CLI scripts, Bots, and Userscripts.
One of the easiest methods to develop scripts for the website is to use Userscript browser extensions, as they basically inject Javascript codes right into the webpage.
Here is a list of browser extensions that were used to run DeviantArt Userscripts:
- Firefox' Greasemonkey,
- Opera's Violentmonkey,
- Chrome's Tampermonkey or
- Safari's Ninjakit.
One advantage of using Userscripts in general (in contrast to Bots, as an example) is that they do not require a manual login process, as all DiFi requests share the same authentication cookie with the webpages themselves.
JS Access demonstrates how to use DiFi requests using Javascript language (and especially within Userscripts).
The DiFi object is a native client that is used by DeviantArt to perform DiFi requests.
Tne DiFi project is used by a number of bots that automate routines on the website. Notable DeviantArt bots are:
- dAhub: (discontinued, closed-source) a point trade account
- dAtrade: (abandoned) a point trade account
- dAbot: (open-source) a multi-purpose python-based script
- dADroid: (open-source) a cross-platform general-purpose library, able to authenticate to the website. Written in two separate Node.js and PHP packages.
The easiest way to document calls is to divide the docs up by the objects:
- ActivityFeed: Watch Feed and Statuses.
- AdminToolbar: The Admin only DiFi calls. They have a toolbar for controlling DA.
Aggregations: Managing folders.- Apps: Browse the channels at the bottom of certain pages.
- Badges: Sending badges to others.
- BPPMsgModules: Voting on group stuff?
- Cart: Shopping cart.
- CategoriesContests: Access information for the contest categories.
-
Comments: Previewing and posting comments.
- CommentAttributes: Managing comments.
- Critique: Critique box.
- CSS: Managing skins.
- DAChat: Provides chat information.
- DailyDeviation: Calling (and administrating?) Daily Deviations.
- DASubmitDeviation: Categorize and submit deviations.
DAMinish: ???- DAWebpageHeader: Fetching the main menu bar HTML.
- Deck: So far, just views category info.
- DeveloperConsole: Managing some of the functions of the console on the developers page.
-
Deviation: Managing and favouriting deviations.
- DeviationView: Navigating deviations.
- DeviationWidget: dA announcement options?
- DiscoveryTags: Interactive #tags.
DomainMap: ???-
DrawPlz: Muro-related methods
- DrawPlzDrafts: recording/autosaving Muro
- DrawPlzModals: Muro-related modals
DREAlerts: DRE alerting of objects- Emoticons: dA Emoticons. =)
- Explore: Undocumented.
- Film: Get film metadata. Undocumented.
- Forum: Manage forums.
- Friends: Manage friends.
- Gallections: Manage collections, folders, galleries.
- GeoLog: deviantArt World map.
-
Grusers: Manage users.
- GrusersAffiliationIncomingModule: Affiliate with other Groups.
- GrusersModules: Manage modules on your profile page.
- GrusersPages: Edit the profile?
- GrusersPrivs: Group admin functions?
- GrusersShoutboxModule: Shoutbox Widget.
- GrusersSubmitToGroupsModule: Submit art to groups.
- GrusersUserpageinfoModule: Manage certain modules. Undocumented.
- Journal: Unknown use
- Logr: Unknown use
- Logs: Unknown use
- Menu: Load a hierarchy menu for certain page.
- MessageCenter: Manage notifications (i.e. messages).
- Moderation: Report deviations.
Mood: Mood information- MultiSubmit: Upload and submit multiple files at once.
News: Managing News.- Notes: View and send notes.
- Order: Unknown use
-
Points: Give points
- PointsDownload: Premium Content or Commission Widgets?
- Poll: Vote in polls.
- PortalCore: Browsing Deviations?
- Portfolio: Managing Portfolios.
-
Prints: Managing Prints.
- PrintShop: Add prints to the cart.
- ProductTabs: Prints sidebar on Deviations.
- Ratings: Submit/revoke ratings on stuff.
- rebilling: Rebilling for Core?
- Resources: Load HTML for pages.
- Settings: Change site-wide settings.
ShopModules: Shop Modules, Undocumented- Spam: Undocumented.
-
Stash: Stash Uploader.
- Stashes: Stash folder managing.
- Stats: Unknown use
- SubmitFeatures: Functions on the Submit page
- Test: Unknown use
-
Today: Fetching (and administrating?) the Today page - User: Profile page management and user activity.
- Util: Unknown use
- Valentine: Information for the most romantical of categories.
vms: Related to VMS Features- Wishlist: Add/remove items from your wishlist.
- Writer: Unknown use
- Protocol: Describes the mechanism of the DiFi protocol
- JS Access: Provides examples and snippets to interact with the DiFi protocol with javascript (e.g. userscripts)
- DiFi object: Explains how the website uses DiFi communications natively
- Glossary: List of DeviantArt technology words
- Dialog: A common DiFi response format that contains a lot of HTML/CSS data.
- Admin Privs: List of Admin Privs and associated ids
-
Resource Types: List of resource types on dA, used to identify folder types and comment's
typeid
s - Deleted Classes: List of now inaccessible classes
- Interesting URLs: List of some links on the website worth checking out
- Reverse-engineering: List of methods used to reverse-engineer the source code
We welcome and appreciate any contribution to the wiki.
Please create an issue to either:
- get write access to the wiki
- report missing, deprecated, erroneous or any new information
DiFi is an internal API of deviantART, and can change at any time. deviantART has made no commitment to support applications using it.
- ActivityFeed
- AdminToolbar
Aggregations- Apps
- Badges
- BPPMsgModules
- Cart
- CategoriesContests
- Comments
- Critique
- CSS
- DAChat
- DailyDeviation
- DASubmitDeviation
DAMinish- DAWebpageHeader
- Deck
- DeveloperConsole
- Deviation
- DiscoveryTags
- DomainMap
- DrawPlz
DREAlerts- Emoticons
- Explore
- Film
- Forum
- Friends
- Gallections
- GeoLog
- Grusers
- Journal
- Logr
- Logs
- Menu
- MessageCenter
- Moderation
Mood- MultiSubmit
News- Notes
- Order
- Points
- Poll
- PortalCore
- Portfolio
- Prints
- ProductTabs
- Ratings
- rebilling
- Resources
- Settings
ShopModules- Spam
- Stash
- Stats
- SubmitFeatures
- Test
Today- User
- Util
- Valentine
vms- Wishlist
- Writer