HMRC MTD VAT HTTP status 401 Unauthorized

HMRC MTD VAT HTTP status 401 Unauthorized

Symptoms:

When customer is attempting to submit or retrieve Making Tax Digital MTD VAT data to and from HMRC, customer may get error messages returned by HMRC. Andica MTD VAT software will read and display the messages.

One such error is:
Your submission has not passed HMRC server validation. It has returned an error message:
401 (Unauthorized) INVALID_CREDENTIALS
You have provided an Invalid Authentication information.

Cause:

According to HMRC, there are several reasons for HTTP status 401 (Unauthorised). A full list of HMRC's MTD VAT error messages is provided in a separate FAQ.

The INVALID_CREDENTIALS message most likely relates to expiry for HMRC access token.

According to HMRC, if the user's access_token has expired, when the software calls an API it receives a response with an HTTP status code of 401 (Unauthorised) and an error code of INVALID_CREDENTIALS.

Solution:

  1. Start the software

  2. If you get a message to update the software, run that. If not then, from the software menu at the top, select Help - Check for Updates...

  3. The software may update itself or you will get a message 'Your software is up to date.'

  4. Try to 'Retrieve VAT Periods'

  5. Follow on screen message and you may be asked if you want to run 'VAT Digital Authorisation', run this routine to authorise the software.

VAT Digital Re-Authorisation can also be processed using the Re-Authorisation feature of the software.

HMRC have a process that must be followed to get MTD VAT submissions started.

If the issue persists, you will need to contact HMRC's Online Services helpdesk on 0300 200 3701 and speak with their MTD VAT team to confirm the registration process. We cannot access HMRC systems to check what is wrong with your digital account and the clients MTD VAT registration.

MTD (Making Tax Digital) - A Guide to Error Messages

The following below error messages might occur when you are connecting to HMRC and also when you are submitting a VAT Return.

Software Message (Symptoms)
HMRC Error scenario
HMRC Error code
Cause
Solution
HMRC server has returned an error message:
HTTP status: 401 (Unauthorized), Code: INVALID_CREDENTIALS
Invalid OAuth token supplied for user-restricted or application-restricted endpoint (including expired token)
Invalid OAuth token supplied for user-restricted or application-restricted endpoint (including expired token)
INVALID_CREDENTIALS
Invalid OAuth token supplied for user-restricted or application-restricted endpoint (including expired token) with the request made to the HMRC server.
Please run the Re-Authorisationther process provided in the Software.
HMRC server has returned an error message:
HTTP status: 401 (Unauthorized), Code: MISSING_CREDENTIALS
No OAuth token supplied for user-restricted or application-restricted endpoint.
No OAuth token supplied for user-restricted or application-restricted endpoint
MISSING_CREDENTIALS
No OAuth token supplied for user-restricted or application-restricted endpoint with the request made to the HMRC server.
Please contact your software provider for further help.
HMRC server has returned an error message:
HTTP status: 401 (Unauthorized), Code: UNAUTHORIZED
Other issue with authentication of the supplied OAuth token.
Other issue with authentication of the supplied OAuth token
UNAUTHORIZED
Issue with authentication of the supplied OAuth token.
Please contact your software provider for further help.
HMRC server has returned an error message:
HTTP status: 401 (Unauthorized), Code:INCORRECT_ACCESS_TOKEN_TYPE
User-restricted API is being accessed with a server token.
User-restricted API is being accessed with a server token
INCORRECT_ACCESS_TOKEN_TYPE
User-restricted API is being accessed with a server token.
Please contact your software provider for further help.

    • Related Articles

    • HMRC MTD VAT HTTP status 400 Bad Request

      Symptoms: When customer is attempting to submit or retrieve Making Tax Digital MTD VAT data to and from HMRC, customer may get error messages returned by HMRC. Andica MTD VAT software will read and display the messages. One such error is:  Your ...
    • HMRC Message HTTP status 404 (Not Found)

      Symptoms: When customer is attempting to retrieve Making Tax Digital MTD VAT data to and from HMRC, customer may get a message in the MTD VAT software: HMRC server has returned an error message: HTTP status: 404 (Not Found), Code: NOT_FOUND No data ...
    • HMRC Message HTTP status 403 (Forbidden)

      Symptoms: When customer is attempting to submit or retrieve Making Tax Digital MTD VAT data to and from HMRC, customer may get a message in the MTD VAT software: HMRC server has returned an error message:  HTTP status: 403 (Forbidden), Code: ...
    • HMRC Message HTTP status 500 (Internal Server Error)

      Symptoms: HMRC server has returned an error message: HTTP status: 500(Internal Server Error), Code: INTERNAL_SERVER_ERROR Internal server error. Or The remote server returned an error: (500) Internal Server Error. This issue is not caused by Andica ...
    • HMRC MTD VAT Digital Re-Authorisation

      An MTD VAT Registered Business or an Agent must give Andica MTD VAT software permission to interact with their data on HMRC MTD system. This is a standard practice required by HMRC. You will need to authorise the software before you can send VAT ...