Steps to reproduce:
export TOKEN="TYPING_MY_TOKEN_HERE"
curl -v \
-H "Authorization: Bot $TOKEN" \
https://kagi.com/api/v0/search\?q\=steve+jobs\&dr\=1
Expected behavior:
Search results
Debug info:
- Trying 34.111.242.115:443...
- Connected to kagi.com (34.111.242.115) port 443 #0)
- ALPN: offers h2
- ALPN: offers http/1.1
- CAfile: /etc/ssl/cert.pem
- CApath: none
- [CONN-0-0][CF-SSL] (304) (OUT), TLS handshake, Client hello (1):
- [CONN-0-0][CF-SSL] (304) (IN), TLS handshake, Server hello (2):
- [CONN-0-0][CF-SSL] (304) (IN), TLS handshake, Unknown (8):
- [CONN-0-0][CF-SSL] (304) (IN), TLS handshake, Certificate (11):
- [CONN-0-0][CF-SSL] (304) (IN), TLS handshake, CERT verify (15):
- [CONN-0-0][CF-SSL] (304) (IN), TLS handshake, Finished (20):
- [CONN-0-0][CF-SSL] (304) (OUT), TLS handshake, Finished (20):
- SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
- ALPN: server accepted h2
- Server certificate:
- subject: CN=*.kagi.com
- start date: Jun 24 10:29:38 2023 GMT
- expire date: Sep 22 10:29:37 2023 GMT
- subjectAltName: host "kagi.com" matched cert's "kagi.com"
- issuer: C=US; O=Let's Encrypt; CN=R3
- SSL certificate verify ok.
- Using HTTP2, server supports multiplexing
- Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
- h2h3 [:method: GET]
- h2h3 [:path: /api/v0/search?q=steve+jobs&dr=1]
- h2h3 [:scheme: https]
- h2h3 [:authority: kagi.com]
- h2h3 [user-agent: curl/7.87.0]
- h2h3 [accept: /]
- h2h3 [authorization: Bot TheTokenITypedEarlier]
- Using Stream ID: 1 (easy handle 0x15c010a00)
GET /api/v0/search?q=steve+jobs&dr=1 HTTP/2
Host: kagi.com
user-agent: curl/7.87.0
accept: /
authorization: Bot TheTokenITypedEarlier
< HTTP/2 401
< x-request-id: 9acff109-6175-4942-a92c-0332eb3fcb50
< cache-control: no-store
< content-type: application/json
< content-length: 12
< date: Thu, 29 Jun 2023 03:23:01 GMT
< via: 1.1 google
< alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
<
- Connection #0 to host kagi.com left intact
Unauthorized%
Image/Video:
Not sure I am getting unauthorized result in the search API. The token is valid and I just recharged my account with USD50.