hmrc / vat-api

Apache License 2.0
66 stars 17 forks source link

403 - Forbidden - this endpoint is not available #961

Closed MatDDev closed 1 year ago

MatDDev commented 1 year ago

Hello, When trying to retrieve VAT Payments, I am getting the following error:

{"Content":{"code":"FORBIDDEN","message":"This endpoint is not available"},"Status":{"code":403,"reason":"Forbidden"}}

I cannot find anything similar in the API Errors Guide, since the FORBIDDEN code relates to a wrong, supplied token, but I was authorized successfully and got both the access and refresh token.

I am using the correct URL for Sandbox and the request. The VAT Reg. No. is coming from a created test user.

URL https://test-api.service.hmrc.gov.uk

Request {"Accept":"application/vnd.hmrc.1.0+json","URLRequestPath":"/organisations/vat/886773945/payments?from=2022-11-01&to=2022-11-30","Method":"GET"}

I'd appreciate any help, thanks.

nrbray commented 1 year ago

I've hit this a second time. Last time I remember having a VPN running with French GEO IP. All worked when I originated from the UK. This time, I have no VPN and it baulked. Any thoughts or clues welcome.

MatDDev commented 1 year ago

Hey @nrbray . If I do remember correctly, it was an authentication issse, even though the error code says something different. I created a new Sandbox Environment, went through the authentication code at my side and it worked.