Account


Current Account

To make requests for the current account, you may use {username: 'me'}. For example, imgur.account.images({username:'me', access_token: 'myaccesstoken'}) will request all the images for the account that is currently authenticated.

Account Base

Request standard user information. If you need the username for the account that is logged in, it is returned in the request for an access token.

Method imgur.account.account()
Response Model Account

Parameters

Key Required Description
username required username of the account

Account Favorites

Returns the users favorited images, only accessible if you're logged in as the user.

Method imgur.account.favorites()
Response Model Gallery Image OR Gallery Album, Note: vote data ('ups', 'downs', and 'score') may be null if the favorited item hasn't been submitted to gallery

Parameters

Key Required Description
username required username of the account

Account Submissions

Return the images a user has submitted to the gallery

Method imgur.account.submissions()
Response Model Gallery Image OR Gallery Album

Parameters

Key Required Description
username required username of the account
page optional integer - allows you to set the page number so you don't have to retrieve all the data at once.

Account Settings

Returns the account settings, only accessible if you're logged in as the user.

Method imgur.account.settings()
Response Model Account Settings

Parameters

Key Required Description
username required username of the account

Change Account Settings

Updates the account settings for a given user, the user must be logged in.

Router imgur.account.changeSettings()
Response Model Basic

Parameters

Key Required Description
username required username of the account
data required
Key Required Description
bio optional The biography of the user, is displayed in the gallery profile page.
public_images optional Set the users images to private or public by default
messaging_enabled optional true | false - Allows the user to enable / disable private messages
album_privacy optional public | hidden | secret - Sets the default privacy level of albums the users creates
accepted_gallery_terms optional true | false - The user agreement to the Imgur Gallery terms.
username optional A valid Imgur username (between 4 and 63 alphanumeric characters)

Account Gallery Profile

Returns the totals for the gallery profile.

Method imgur.account.galleryProfile()
Response Model Gallery Profile

Parameters

Key Required Description
username required username of the account

Verify User's E-mail

Checks to see if user has verified their email address

Method imgur.account.verifyEmail()
Response Model Basic

Parameters

Key Required Description
username required username of the account

Send Verification E-mail

Sends an email to the user to verify that their email is valid to upload to gallery. Must be logged in as the user to send.

Method imgur.account.sendVerificationEmail()
Response Model Basic

Parameters

Key Required Description
username required username of the account

Albums

Get all the albums associated with the account. Must be logged in as the user to see secret and hidden albums.

Method imgur.account.albums()
Response Model Album

Parameters

Key Required Description
username required username of the account
page optional integer - allows you to set the page number so you don't have to retrieve all the data at once.

Album

Get additional information about an album, this endpoint works the same as the Album Endpoint. You can also use any of the additional routes that are used on an album in the album endpoint.

Method imgur.account.album()
Response Model Album

Parameters

Key Required Description
username required username of the account
id required id of the album

Album IDs

Return an array of all of the album IDs.

Method imgur.account.albumIds()
Response Model Basic

Parameters

Key Required Description
username required username of the account
page optional integer - allows you to set the page number so you don't have to retrieve all the data at once.

Album Count

Return the total number of albums associated with the account.

Method imgur.account.albumCount()
Response Model Basic

Parameters

Key Required Description
username required username of the account

Album Deletion

Delete an Album with a given id.

Method imgur.account.deleteAlbum()
Response Model Basic

Parameters

Key Required Description
username required username of the account
id required id of the album

Comments

Return the comments the user has created.

Method imgur.account.comments()
Response Model Comment

Parameters

Key Required Description
username required username of the account
page optional integer - allows you to set the page number so you don't have to retrieve all the data at once.
sort optional 'oldest', or 'newest'. Defaults to 'newest'.

Comment

Return information about a specific comment. This endpoint works the same as the Comment Endpoint. You can use any of the additional actions that the comment endpoint allows on this end point.

Method imgur.account.comment()
Response Model Comment

Parameters

Key Required Description
username required username of the account
id required id of the comment

Comment IDs

Return an array of all of the comment IDs.

Method imgur.account.commentIds()
Response Model Basic

Parameters

Key Required Description
username required username of the account
page optional integer - allows you to set the page number so you don't have to retrieve all the data at once.
sort optional 'oldest', or 'newest'. Defaults to 'newest'.

Comment Count

Return a count of all of the comments associated with the account.

Method imgur.account.commentCount()
Response Model Basic

Parameters

Key Required Description
username required username of the account

Comment Deletion

Delete a comment. You are required to be logged in as the user whom created the comment.

Method imgur.account.deleteComment()
Response Model Basic

Parameters

Key Required Description
username required username of the account
id required id of the comment

Images

Return all of the images associated with the account. You can page through the images by setting the page, this defaults to 0.

Method imgur.account.images()
Response Model Image

Parameters

Key Required Description
username required username of the account
page optional integer - allows you to set the page number so you don't have to retrieve all the data at once.

Image

Return information about a specific image. This endpoint works the same as the Image Endpoint. You can use any of the additional actions that the image endpoint with this endpoint.

Method imgur.account.image()
Response Model Image

Parameters

Key Required Description
username required username of the account
id required id of the image

Image IDs

Returns an array of Image IDs that are associated with the account.

Method imgur.account.imageIds
Response Model Basic

Parameters

Key Required Description
username required username of the account
page optional integer - allows you to set the page number so you don't have to retrieve all the data at once.

Image Count

Returns the total number of images associated with the account.

Method imgur.account.imageCount()
Response Model Basic

Parameters

Key Required Description
username required username of the account

Image Deletion

Deletes an Image. This requires a delete hash rather than an ID.

Method imgur.account.deleteImage()
Response Model Basic

Parameters

Key Required Description
username required username of the account
deletehash required delete hash of the image

Replies

Returns all of the reply notifications for the user. Required to be logged in as that user

Method imgur.account.replies()
Response Model Notification

Parameters

Key Required Description
username required username of the account
newReplies optional boolean - false for all notifications, true for only non-viewed notification. Default is true.

Album


Additional Information

Everywhere you see ids[], you need to pass the data as an array {ids: [1,2]}.

Album

Get information about a specific album.

Method imgur.album.album()
Response Model Album

Parameters

Key Required Description
id required id of the album

Album Images

Return all of the images in the album

Method imgur.album.images()
Response Model Image

Parameters

Key Required Description
id required id of the album

Album Image

Get information about an image in an album, any additional actions found in Image Endpoint will also work.

Method imgur.album.image()
Response Model Image

Parameters

Key Required Description
album_id required id of the album
image_id required id of the image

Album Creation

Create a new album. Optional parameter of ids[] is an array of image ids to add to the album.

This method is available without authenticating an account, and may be used merely by sending "Authorization: Client-ID {client_id}" in the request headers. Doing so will create an anonymous album which is not tied to an account.

Method imgur.album.create()
Response Model Basic

Parameters

Key Required Description
data required
Key Required Description
ids[] optional The image ids that you want to be included in the album.
title optional The title of the album
description optional The description of the album
privacy optional Sets the privacy level of the album. Values are : public | hidden | secret
layout optional Sets the layout to display the album. Values are : blog | grid | horizontal | vertical
cover optional The ID of an image that you want to be the cover of the album

Update Album

Update the information of an album. For anonymous albums, {album} should be the deletehash that is returned at creation.

Method imgur.album.update()
Response Model Basic

Parameters

Key Required Description
id required id of the album
data required
Key Required Description
ids[] optional The image ids that you want to be included in the album.
title optional The title of the album
description optional The description of the album
privacy optional Sets the privacy level of the album. Values are : public | hidden | secret
layout optional Sets the layout to display the album. Values are : blog | grid | horizontal | vertical
cover optional The ID of an image that you want to be the cover of the album

Album Deletion

Delete an album with a given ID. You are required to be logged in as the user to delete the album. For anonymous albums, {album} should be the deletehash that is returned at creation.

Method imgur.album.delete()
Response Model Basic

Parameters

Key Required Description
id required id of the album

Favorite Album

Favorite an album with a given ID. The user is required to be logged in to favorite the album.

Method imgur.album.favorite()
Response Model Basic

Parameters

Key Required Description
id required id of the album

Set Album Images

Sets the images for an album, removes all other images and only uses the images in this request. For anonymous albums, album_id should be the deletehash that is returned at creation.

Method imgur.album.setImages()
Response Model Basic

Parameters

Key Required Description
album_id required id of the album
image_ids[] required The image ids that you want to be added to the album.

Add Images to an Album

Takes parameter, ids[], as an array of ids to add to the album. Alternatively, the ids parameter can take a comma delimted string of ids. See below for examples. For anonymous albums, album_id should be the deletehash that is returned at creation.

Method imgur.album.addImages()
Response Model Basic

Parameters

Key Required Description
album_id required id of the album
image_ids[] required The image ids that you want to be added to the album.

Remove Images from an Album

Takes parameter, ids[], as an array of ids and removes from the album. For anonymous albums, {album} should be the deletehash that is returned at creation.

Method imgur.album.deleteImages()
Response Model Basic

Parameters

Key Required Description
album_id required id of the album
image_ids[] required The image ids that you want to be added to the album.

Comment


Comment

Get information about a specific comment.

Method imgur.comment.comment()
Response Model Comment

Parameters

Key Required Description
id required id of the comment

Comment Creation

Creates a new comment, returns the ID of the comment.

Method imgur.comment.create()
Response Model Basic

Parameters

Key Required Description
image_id required The ID of the image in the gallery that you wish to comment on
comment required The comment text, this is what will be displayed
parent_id optional The ID of the parent comment, this is an alternative method to create a reply.

Comment Deletion

Delete a comment by the given id.

Method imgur.comment.delete()
Response Model Basic

Parameters

Key Required Description
id required id of the comment

Replies

Get the comment with all of the replies for the comment.

Method imgur.comment.replies()
Response Model Comment

Parameters

Key Required Description
id required id of the comment

Reply Creation

Create a reply for the given comment.

Method imgur.comment.createReply()
Response Model Basic

Parameters

Key Required Description
comment_id required id of the comment
image_id required The ID of the image in the gallery that you wish to comment on
comment required The comment text, this is what will be displayed

Vote

Vote on a comment. The {vote} variable can only be set as "up" or "down".

Method imgur.comment.vote()
Response Model Basic

Parameters

Key Required Description
id required id of the comment
vote required "up" or "down"

Report

Report a comment for being inappropriate.

Method imgur.comment.report()
Response Model Basic

Parameters

Key Required Description
id required id of the comment

Conversation


Conversation List

Get list of all conversations for the logged in user.

Method imgur.conversation.conversations()
Response Model Array of Conversation

Conversation

Get information about a specific conversation. Includes messages.

Method imgur.conversation.conversation()
Response Model Conversation

Parameters

Key Required Description
id required id of the conversation
page optional Page of message thread. Starting at 1 for the most recent 25 messages and counting upwards. Defaults to 1
offset optional Additional offset in current page, defaults to 0.

Message Creation

Create a new message.

Method imgur.conversation.createMessage()
Response Model Basic

Parameters

Key Required Description
recipient required The recipient username, this person will receive the message
body required The message itself, similar to the body of an email.

Conversation Deletion

Delete a conversation by the given ID.

Method imgur.conversation.delete()
Response Model Basic

Parameters

Key Required Description
id required id of the conversation

Report Sender

Report a user for sending messages that are against the Terms of Service.

Method imgur.conversation.reportSender()
Response Model Basic

Parameters

Key Required Description
username required username of the account

Block Sender

Block the user from sending messages to the user that is logged in.

Method imgur.conversation.blockSender()
Response Model Basic

Parameters

Key Required Description
username required username of the account

Image


Image

Get information about an image.

Method imgur.image.image()
Response Model Image

Parameters

Key Required Value
id required id of the image

Image Upload

Upload a new image.

Method imgur.image.upload()
Response Model Basic

Parameters

Key Required Description
file required A binary file, base64 data, or a URL for an image. (up to 10MB) EG:imgur.image.upload({file: fs.createReadStream('myImage.png')})
album optional The id of the album you want to add the image to. For anonymous albums, {album} should be the deletehash that is returned at creation.
type optional The type of the file that's being sent; file, base64 or URL
name optional The name of the file, this is automatically detected if uploading a file with a POST and multipart / form-data
title optional The title of the image.
description optional The description of the image.

Image Deletion

Deletes an image. For an anonymous image, id must be the image's deletehash. If the image belongs to your account then passing the ID of the image is sufficient.

Method imgur.image.delete()
Response Model Basic

Parameters

Key Required Value
id required id of the image

Update Image Information

Updates the title or description of an image. You can only update an image you own and is associated with your account. For an anonymous image, {id} must be the image's deletehash.

Method imgur.image.update()
Response Model Basic

Parameters

Key Required Value
id required id of the image
data required
Key Required Description
title optional The title of the image.
description optional The description of the image.

Favorite an Image

Favorite an image with the given ID. The user is required to be logged in to favorite the image.

Method imgur.image.favorite()
Response Model Basic

Parameters

Key Required Value
id required id of the image

MemeGen


It's not yet possible to create memes via the API. If you're interested in this feature then let us know by posting on the Imgur API Google Group.

Default Memes

Get the list of default memes.

Method imgur.memeGen.memeGen()
Response Model Image

Notification


Notifications

Get all notifications for the user that's currently logged in

Method imgur.notification.notifications()
Response Model Array of Notifications keyed under 'messages' and 'replies'.

Parameters

Key Required Value
newReplies optional boolean - false for all notifications, true for only non-viewed notification. Default is true.

Notification

Returns the data about a specific notification

Method imgur.notification.notification()
Response Model Notification

Parameters

Key Required Value
id required id of the notification

Notification Viewed

Marks a notification as viewed, this way it no longer shows up in the basic notification request

Method imgur.notification.setViewed()
Response Model Basic

Parameters

Key Required Value
ids[] optional To mark multiple notifications as read in one call, pass in an 'ids' parameter (omitting the 'id' parameter in the route) with the value of a comma-separated string of notification ids.

Oauth


OAuth URL

Returns the URL for the user to visit to authenticate.

Method imgur.oauth.getOauthUrl()

Authorize Callback

Returned to your application via the redirect URL you specified during registration, in the form of a regular query string parameter. (Keep in mind that you can use localhost as a redirect URL.) For example: http://example.com?code=AUTHORIZATION_CODE After you have the authorization_code, it must be exchanged for an access_token and refresh_token.

Method imgur.oauth.authorizeCallback()

Parameters

Key Required Value
authToken required

Refresh Token

If a user has authorized their account but you no longer have a valid access_token for them, then a new one can be generated by using the refresh_token. When your application receives a refresh token, it is important to store that refresh token for future use. If your application loses the refresh token, you will have to prompt the user for their login information again.

Method imgur.oauth.refreshToken()

Parameters

Key Required Value
refreshToken required

Topic


Default Topics

Get the list of default topics.

Method imgur.topic.topics()
Response Model Topic