vasanthv / jsonbox

HTTP-based JSON storage.
https://jsonbox.io
MIT License
2.49k stars 173 forks source link

How to get API_ KEY #75

Closed jawa0919 closed 3 years ago

jawa0919 commented 3 years ago

Thank you for your free service

test.http

POST https://jsonbox.io/box_03b46fcdb8926a1b2eef HTTP/1.1
Content-Type: application/json

{"name": "Jon Snow", "age": 25}

Response

POST https://jsonbox.io/box_03b46fcdb8926a1b2eef HTTP/1.1
User-Agent: vscode-restclient
Content-Type: application/json
accept-encoding: gzip, deflate
content-length: 31
cookie: __cfduid=d488182a5636f2c08c910a10be241f6781603012854

{
  "name": "Jon Snow",
  "age": 25
}

HTTP/1.1 401 Unauthorized
Date: Sun, 18 Oct 2020 09:21:56 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 30
Connection: close
X-Powered-By: Express
Access-Control-Allow-Origin: *
Etag: W/"1e-NSvI/xx+ygCisT8KmSK3s9GLVMI"
Via: 1.1 vegur
CF-Cache-Status: DYNAMIC
cf-request-id: 05dc9d0c4b0000d39a46079000000001
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?lkg-colo=12&lkg-time=1603012917"}],"group":"cf-nel","max_age":604800}
NEL: {"report_to":"cf-nel","max_age":604800}
Server: cloudflare
CF-RAY: 5e413126da9fd39a-LAX

{
  "message": "Invalid API_KEY."
}
vasanthv commented 3 years ago

There is no way to retrieve the API_KEY. It is the key you used while creating this records. Docs here: https://github.com/vasanthv/jsonbox#how-to-create-a-protected-box

jawa0919 commented 3 years ago

sry, I mean, I want to get a API_KEY , like 7b3b910b-a7ad-41e8-89d6-5e28e2e34e70

error.http

POST https://jsonbox.io/box_03b46fcdb8926a1b2eef HTTP/1.1
Content-Type: application/json

{"name": "Jon Snow", "age": 25}
{
  "message": "Invalid API_KEY."
}

right.http

POST https://jsonbox.io/box_03b46fcdb8926a1b2eef HTTP/1.1
Content-Type: application/json
x-api-key: 7b3b910b-a7ad-41e8-89d6-5e28e2e34e70

{"name": "Jon Snow", "age": 25}
{
  "_id": "5f8ef3d4443ce00017265826",
  "name": "Jon Snow",
  "age": 25,
  "_createdOn": "2020-10-20T14:27:32.036Z"
}
vasanthv commented 3 years ago

Thats a GUID format, you can use any valid GUID. Try https://www.guidgenerator.com

Is that what you are looking for?

jawa0919 commented 3 years ago

Thats a GUID format, you can use any valid GUID. Try https://www.guidgenerator.com

Is that what you are looking for?

yes!