开源中国 API
  1. 评论
开源中国 API
  • OSCHINA 开放平台Beta
  • 认证接口
    • oauth2_authorize
      GET
    • oauth2_token
      POST
  • 个人信息
    • openapi_user
      POST
    • user_information
      POST
    • my_information
      POST
    • portrait_update
      POST
    • friends_list
      POST
    • active_list
      POST
    • update_user_relation
      POST
  • 新闻
    • news_list
      POST
    • /action/openapi/news_detail
      POST
  • 帖子
    • post_list
      POST
    • post_pub
      POST
    • post_detail
      POST
  • 动弹
    • tweet_list
      POST
    • tweet_detail
      POST
    • tweet_pub
      POST
    • tweet_delete
      POST
  • 博客
    • blog_pub
    • blog_list
    • blog_recommend_list
    • blog_detail
    • user_blog_list
    • blog_catalog_list
  • 评论
    • blog_comment_list
      POST
    • blog_comment_pub
      POST
    • blog_comment_reply
      POST
    • user_blog_delete
      POST
    • comment_list
      POST
    • comment_pub
      POST
    • comment_reply
      POST
    • comment_delete
      POST
  • 收藏
    • favorite_list
    • favorite_add
    • favorite_remove
  • 软件
    • project_detail
    • project_catalog_list
    • project_list
    • project_tag_list
  • 私信
    • message_list
    • message_delete
  • 搜索
    • search_list
  • 通知
    • user_notice
    • clear_notice
  1. 评论

comment_delete

POST
/action/openapi/comment_delete
删除评论
是否需要登录
是
访问授权限制
password
授权范围(scope)
访问评论信息
注意事项
1、catalog = 1 时:id 大于 10000000 则为翻译,所需参数为:access_token,id,replyid
id小于10000000 则是新闻,所需参数为:access_token,id,replyid,authorid
2、catalog = 2 时,所需参数:access_token,id,authorid,replyid
3、catalog = 3 时,所需参数:access_token,id,replyid
4、catalog = 4 时,所需参数:access_token,id或replyid(id或replayid都为私信id)
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://www.oschina.net/action/openapi/comment_delete' \
--header 'Content-Type: application/json' \
--data-raw '{
    "access_token": "string",
    "catalog": 0,
    "id": 0,
    "replyid": 0,
    "authorid": 0,
    "dataType": "string"
}'
响应示例响应示例
{
  "error": {
    "code": 200,
    "msg": "操作成功完成"
  }
}

请求参数

Body 参数application/json
access_token
string 
必需
oauth2_token获取的access_token
catalog
integer 
必需
评论对象类型:1-新闻或翻译,2-帖子、问答,3-动弹,4-私信
id
integer 
必需
对象id:新闻、翻译id,帖子id,动弹id
replyid
integer 
必需
当前要回复的评论的id
authorid
integer 
必需
回复的此条评论的发布者的用户id
dataType
string 
必需
返回值类型['json'|'jsonp'|'xml']
示例

返回响应

🟢200成功
application/json
Body
error
object 
必需
code
integer 
必需
错误代码(200-操作成功,500-操作失败)
msg
string 
错误描述
必需
修改于 2022-07-08 09:55:22
上一页
comment_reply
下一页
favorite_list
Built with