QuantumNous / QuantumNous/new-api

文档创建令牌接口调用失败

Open
#4,232 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
48.5k
Forks
11.6k
Avg merge
1d 17h
Merged PRs (30d)
58

Description

Read This First (Do Not Remove This Section)

Your current newapi version
文档创建令牌接口调用失败
Please fill this in, for example: v1.0.0
v0.12.9
Submission Checks

  • [v] I have confirmed there are no similar issues
  • [v] I have thoroughly read the docs at https://docs.newapi.ai/ and the project README, especially the FAQ section
  • [v] I have not removed any guidance or section headings from this template and will complete it as requested
  • [v] I understand that maintainers have limited time and issues that do not follow this template may be ignored or closed directly

Issue Description
文档创建令牌接口调用失败
Steps to Reproduce
请求方法: POST
请求URL: http://192.168.2.90:3000/api/token/
请求头:
Authorization: sk-88888888888888888888888888888888
New-Api-User: 2
Content-Type: application/json
请求体: {"unlimited_quota":false,"user_id":"2","name":"aasd","remain_quota":20000000,"expired_time":-1,"status":1}
Expected Result
{
"message": "",
"success": true
}
Related Screenshots
{"message":"Unauthorized, invalid access token","success":false}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the POST /api/token/ endpoint and compare its authorization requirements with the documentation and the supplied Authorization and New-Api-User headers. Reproduce the request against v0.12.9, trace where the invalid access token response is produced, and confirm that a valid documented request returns success.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, authentication, authorization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.