I'd like to upload an image file.
https://api.imgbb.com/
curl --location --request POST "https://api.imgbb.com/1/upload?expiration=600&key=YOUR_CLIENT_API_KEY" --form "image=R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
I succeeded in command window.
If I execute the code as above, an error will occur.
ResponseError. Reason: , Response: {"status_code":400,"error":{"message":"Invalid API v1 key.","code":100,"context":"Exception"},"status_txt":"Bad Request"}
MY_KEY is right
I need your help. Thank you.
https://api.imgbb.com/
curl --location --request POST "https://api.imgbb.com/1/upload?expiration=600&key=YOUR_CLIENT_API_KEY" --form "image=R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
I succeeded in command window.
imgbb:
Private Sub Button1_Click
Dim base As String = Base64EncodeDecodeImage.Base64ImageToString(File.DirAssets,"test.jpg")
Dim hj As HttpJob
hj.Initialize("hj",Me)
Dim sb As StringBuilder
sb.Initialize
sb.Append($""key=MY_KEY&image="$).Append(base).Append($"""$)
Log(sb.ToString)
hj.PostString("https://api.imgbb.com/1/upload",sb.ToString)
wait for (hj) JobDone(hj As HttpJob)
Log(hj.GetString)
End Sub
If I execute the code as above, an error will occur.
ResponseError. Reason: , Response: {"status_code":400,"error":{"message":"Invalid API v1 key.","code":100,"context":"Exception"},"status_txt":"Bad Request"}
MY_KEY is right
I need your help. Thank you.
Last edited: