Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with api v3 #131

Open
kugimiya530 opened this issue Sep 11, 2024 · 2 comments
Open

problem with api v3 #131

kugimiya530 opened this issue Sep 11, 2024 · 2 comments

Comments

@kugimiya530
Copy link

Hi I was running my own fullnode

and http ton api

however

if my domain is ton.xxx.zzz

when i want to call v2 api
/getAddressBalance
it should be

curl -X 'GET' \
  'http://ton.xxx.zzz/api/v2/getAddressBalance?address=UQCalesZz9ifhdN7ol-XRSFrZkr5Uj8lWSSpCLRiEvjyJHBc' \
  -H 'accept: application/json'

but for me its only work when i take off api/v2

curl -X 'GET' \
  'http://ton.xxx.zzz/getAddressBalance?address=UQCalesZz9ifhdN7ol-XRSFrZkr5Uj8lWSSpCLRiEvjyJHBc' \
  -H 'accept: application/json'
  

what wrong with my node and api...

and V3 is totally not work for me

anyone have idea?

@azerella
Copy link

You need to configure the API root path env var like so:

export TON_API_ROOT_PATH=/api/v2

@kugimiya530
Copy link
Author

Hi Adam

Appreciate you help

how if i want to access v2 and v3

what value should i export

-------------additional-------------

Should I set it in the .env file and then run docker compose up, or should I use export for the TON_API_ROOT_PATH?

I just tried export TON_API_ROOT_PATH=/api/v2, but the situation remains the same as before.

curl -X 'GET' \
  'http://ton.xxx.zzz/api/v2/getAddressBalance?address=UQCalesZz9ifhdN7ol-XRSFrZkr5Uj8lWSSpCLRiEvjyJHBc' \
  -H 'accept: application/json'

{"ok":false,"error":"Not Found","code":404}

but for me its only work when i take off api/v2

curl -X 'GET' \
  'http://ton.xxx.zzz/getAddressBalance?address=UQCalesZz9ifhdN7ol-XRSFrZkr5Uj8lWSSpCLRiEvjyJHBc' \
  -H 'accept: application/json'

{"ok":true,"result":"6896292093"}

and ... didn't answer the v3 api problem

Thx again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants