ByteChef LogoByteChef

Dev.to

Dev.to is an online community and platform where software developers share articles, tutorials, and discussions about programming and technology.

Categories: Productivity and Collaboration

Type: devto/v1


Connections

Version: 1

API Key

Properties

NameLabelTypeDescriptionRequired
keyKeySTRINGtrue
valueAPI KeySTRINGtrue

Connection Setup

Follow these steps to generate a Dev.to API Key and configure the ByteChef connection.

Prerequisites:

  • You have an active account at dev.to

Steps to generate an API Key on Dev.to:

  1. Log in to your dev.to account.
  2. Open Settings: click your avatar (top‑right) → Settings, or go directly to https://dev.to/settings.
  3. In the left sidebar, select Extensions, or go directly to https://dev.to/settings/extensions.
  4. Scroll to the section DEV Community API Keys.
  5. Enter a description/name for the key and click Generate API Key.
  6. A dropdown will appear under the button. Expand it to reveal your new API key.
  7. Copy the API key and store it securely. You can revoke it at any time from the same page.

Configure the ByteChef Dev.to connection:

  1. In ByteChef, create a new Dev.to connection.
  2. Paste the API key into the "API Key" field.
  3. Save the connection. ByteChef will use this key by sending it in the api-key HTTP header to https://dev.to/api.

Notes and troubleshooting:

  • Treat the API key like a password. Do not share it or commit it to source control.
  • If you receive 401 Unauthorized errors, verify that the key is correct and has not been revoked.
  • You can create multiple keys (e.g., for different environments) and revoke them individually.
  • Dev.to API reference and authentication details: https://developers.forem.com/api/#section/Authentication

Actions

Create Article

Name: createArticle

Creates a new article.

Properties

NameLabelTypeDescriptionRequired
articleArticleOBJECT
Properties {STRING(title), STRING(body_markdown), BOOLEAN(published), STRING(description)}
false

Example JSON Structure

{
  "label" : "Create Article",
  "name" : "createArticle",
  "parameters" : {
    "article" : {
      "title" : "",
      "body_markdown" : "",
      "published" : false,
      "description" : ""
    }
  },
  "type" : "devto/v1/createArticle"
}

Output

Type: OBJECT

Properties

NameTypeDescription
type_ofSTRING
idINTEGERThe unique identifier of the article.
titleSTRINGThe title of the article.
descriptionSTRINGThe description of the article.
slugSTRING
pathSTRINGThe path of the article.
urlSTRINGThe URL of the article.
comments_countINTEGERThe number of comments on the article.
public_reactions_countINTEGERThe number of public reactions on the article.
positive_reactions_countINTEGERThe number of positive reactions on the article.
created_atDATE_TIMEThe date and time when the article was created.
edited_atDATE_TIMEThe date and time when the article was last edited.
crossposted_atDATE_TIMEThe date and time when the article was crossposted.
published_atDATE_TIMEThe date and time when the article was published.
last_comment_atDATE_TIMEThe date and time of the last comment on the article.
reading_time_minutesINTEGERThe estimated reading time of the article in minutes.
tag_listSTRINGThe tags of the article.
tagsARRAY
Items [STRING]
The tags of the article.
body_htmlSTRINGThe body of the article in HTML format.
body_markdownSTRINGThe body of the article in markdown format.
userOBJECT
Properties {STRING(name), STRING(username), STRING(twitter_username), STRING(github_username), INTEGER(user_id)}

Output Example

{
  "type_of" : "",
  "id" : 1,
  "title" : "",
  "description" : "",
  "slug" : "",
  "path" : "",
  "url" : "",
  "comments_count" : 1,
  "public_reactions_count" : 1,
  "positive_reactions_count" : 1,
  "created_at" : "2021-01-01T00:00:00",
  "edited_at" : "2021-01-01T00:00:00",
  "crossposted_at" : "2021-01-01T00:00:00",
  "published_at" : "2021-01-01T00:00:00",
  "last_comment_at" : "2021-01-01T00:00:00",
  "reading_time_minutes" : 1,
  "tag_list" : "",
  "tags" : [ "" ],
  "body_html" : "",
  "body_markdown" : "",
  "user" : {
    "name" : "",
    "username" : "",
    "twitter_username" : "",
    "github_username" : "",
    "user_id" : 1
  }
}

Get Article

Name: getArticle

Get article by id.

Properties

NameLabelTypeDescriptionRequired
articleIdArticle IDINTEGERThe unique identifier of the article. Only your articles are listed in the options. See documentation for instructions on how to find ID of any article.true

Example JSON Structure

{
  "label" : "Get Article",
  "name" : "getArticle",
  "parameters" : {
    "articleId" : 1
  },
  "type" : "devto/v1/getArticle"
}

Output

Type: OBJECT

Properties

NameTypeDescription
type_ofSTRING
idINTEGERThe unique identifier of the article.
titleSTRINGThe title of the article.
descriptionSTRINGThe description of the article.
slugSTRING
pathSTRINGThe path of the article.
urlSTRINGThe URL of the article.
comments_countINTEGERThe number of comments on the article.
public_reactions_countINTEGERThe number of public reactions on the article.
positive_reactions_countINTEGERThe number of positive reactions on the article.
created_atDATE_TIMEThe date and time when the article was created.
edited_atDATE_TIMEThe date and time when the article was last edited.
crossposted_atDATE_TIMEThe date and time when the article was crossposted.
published_atDATE_TIMEThe date and time when the article was published.
last_comment_atDATE_TIMEThe date and time of the last comment on the article.
reading_time_minutesINTEGERThe estimated reading time of the article in minutes.
tag_listSTRINGThe tags of the article.
tagsARRAY
Items [STRING]
The tags of the article.
body_htmlSTRINGThe body of the article in HTML format.
body_markdownSTRINGThe body of the article in markdown format.
userOBJECT
Properties {STRING(name), STRING(username), STRING(twitter_username), STRING(github_username), INTEGER(user_id)}

Output Example

{
  "type_of" : "",
  "id" : 1,
  "title" : "",
  "description" : "",
  "slug" : "",
  "path" : "",
  "url" : "",
  "comments_count" : 1,
  "public_reactions_count" : 1,
  "positive_reactions_count" : 1,
  "created_at" : "2021-01-01T00:00:00",
  "edited_at" : "2021-01-01T00:00:00",
  "crossposted_at" : "2021-01-01T00:00:00",
  "published_at" : "2021-01-01T00:00:00",
  "last_comment_at" : "2021-01-01T00:00:00",
  "reading_time_minutes" : 1,
  "tag_list" : "",
  "tags" : [ "" ],
  "body_html" : "",
  "body_markdown" : "",
  "user" : {
    "name" : "",
    "username" : "",
    "twitter_username" : "",
    "github_username" : "",
    "user_id" : 1
  }
}

Find article ID

To find article ID, click here

Update Article

Name: updateArticle

Updates an existing article.

Properties

NameLabelTypeDescriptionRequired
articleIdArticle IDINTEGERThe unique identifier of the article. You can update only your own articles.true
articleArticleOBJECT
Properties {STRING(title), STRING(body_markdown), BOOLEAN(published), STRING(description)}
false

Example JSON Structure

{
  "label" : "Update Article",
  "name" : "updateArticle",
  "parameters" : {
    "articleId" : 1,
    "article" : {
      "title" : "",
      "body_markdown" : "",
      "published" : false,
      "description" : ""
    }
  },
  "type" : "devto/v1/updateArticle"
}

Output

Type: OBJECT

Properties

NameTypeDescription
type_ofSTRING
idINTEGERThe unique identifier of the article.
titleSTRINGThe title of the article.
descriptionSTRINGThe description of the article.
slugSTRING
pathSTRINGThe path of the article.
urlSTRINGThe URL of the article.
comments_countINTEGERThe number of comments on the article.
public_reactions_countINTEGERThe number of public reactions on the article.
positive_reactions_countINTEGERThe number of positive reactions on the article.
created_atDATE_TIMEThe date and time when the article was created.
edited_atDATE_TIMEThe date and time when the article was last edited.
crossposted_atDATE_TIMEThe date and time when the article was crossposted.
published_atDATE_TIMEThe date and time when the article was published.
last_comment_atDATE_TIMEThe date and time of the last comment on the article.
reading_time_minutesINTEGERThe estimated reading time of the article in minutes.
tag_listSTRINGThe tags of the article.
tagsARRAY
Items [STRING]
The tags of the article.
body_htmlSTRINGThe body of the article in HTML format.
body_markdownSTRINGThe body of the article in markdown format.
userOBJECT
Properties {STRING(name), STRING(username), STRING(twitter_username), STRING(github_username), INTEGER(user_id)}

Output Example

{
  "type_of" : "",
  "id" : 1,
  "title" : "",
  "description" : "",
  "slug" : "",
  "path" : "",
  "url" : "",
  "comments_count" : 1,
  "public_reactions_count" : 1,
  "positive_reactions_count" : 1,
  "created_at" : "2021-01-01T00:00:00",
  "edited_at" : "2021-01-01T00:00:00",
  "crossposted_at" : "2021-01-01T00:00:00",
  "published_at" : "2021-01-01T00:00:00",
  "last_comment_at" : "2021-01-01T00:00:00",
  "reading_time_minutes" : 1,
  "tag_list" : "",
  "tags" : [ "" ],
  "body_html" : "",
  "body_markdown" : "",
  "user" : {
    "name" : "",
    "username" : "",
    "twitter_username" : "",
    "github_username" : "",
    "user_id" : 1
  }
}

Find article ID

To find article ID, click here

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional Instructions

How to find article ID

  1. Open article for which you want to find the ID.
  2. Right click on page and select View page source.
  3. Search (Ctrl + F) for article_id.
  4. Number after '=' is ID of the article.

How is this guide?

Last updated on

On this page