Home > Mobile >  curl/wget stopped working (I didn't change anything), but exact same URL works in browser
curl/wget stopped working (I didn't change anything), but exact same URL works in browser

Time:12-10

If I go to this URL in browser:

https://api.bscscan.com/api?module=account&action=balance&address=0x3f349bBaFEc1551819B8be1EfEA2fC46cA749aA1&apikey=DJD6AQYBZTP197BBYKR5G4DDRH4YMQZKSX

it works fine, returning:

{"status":"1","message":"OK","result":"60824359763526706"}

If I put the EXACT same URL in curl or wget, it gets 'Invalid API key' and I don't know why. It's the exact same URL.

$ curl -X GET --header 'Accept: application/json' "https://api.bscscan.com/api?module=account&action=balance&address=0x61aE35Be08ea92f9263cDbA2Af0dBC1d4861d652&apikey=DJD6AQYBZTP197BBYKR5G4DDRH4YMQZKSX" 2>> /dev/null
{"status":"0","message":"NOTOK","result":"Invalid API Key"}

$ wget --timeout=15 -O - -o /dev/null "https://api.bscscan.com/api?module=account&action=balance&address=0x61aE35Be08ea92f9263cDbA2Af0dBC1d4861d652&apikey=DJD6AQYBZTP197BBYKR5G4DDRH4YMQZKSX"
{"status":"0","message":"NOTOK","result":"Invalid API Key"}

I don't understand what happened here, since it was working a few days ago.

CodePudding user response:

this is fixed. Apparently it was Bscscan problem.

enter image description here

  • Related