Minimum D1 permissions for HTTP API

Can you try make a token with just edit?
7 Replies
meow
meow4w ago
I tried and same auth error
Max (@rozenmd)
Max (@rozenmd)OP4w ago
it sounds like the client library isn't using your token?
meow
meow4w ago
I get the same error with curl I'll see if I get the same error with curl & my global key as well my global key gets through on curl
Max (@rozenmd)
Max (@rozenmd)OP4w ago
does your curl request look like this?
curl https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID_HERE/d1/database \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer TOKEN_HERE"
curl https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID_HERE/d1/database \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer TOKEN_HERE"
meow
meow4w ago
No, it looks like
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID_HERE/d1/database \
-H "X-Auth-Email: $EMAIL_HERE" \
-H "X-Auth-Key: $TOKEN_HERE"
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID_HERE/d1/database \
-H "X-Auth-Email: $EMAIL_HERE" \
-H "X-Auth-Key: $TOKEN_HERE"
That's from the docs for the rest api Oh your way works I see, I just need to modify my headers then
Unknown User
Unknown User4w ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?