# Getting invalid token error when trying to acess Mautic API

**URL:** <https://forum.mautic.org/t/getting-invalid-token-error-when-trying-to-acess-mautic-api/27843>\
**Category:** Product Support\
**Created:** [April 27, 2023, 8:10pm UTC](https://forum.mautic.org/t/getting-invalid-token-error-when-trying-to-acess-mautic-api/27843 "2023-04-27T20:10:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedrohqalves](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/pedrohqalves/32/9706_2.png) [@pedrohqalves](https://forum.mautic.org/u/pedrohqalves)\
**Post date:** [April 27, 2023, 8:10pm UTC](https://forum.mautic.org/t/getting-invalid-token-error-when-trying-to-acess-mautic-api/27843/1 "2023-04-27T20:10:04Z")

</div>

Have been getting 401 error when trying to acess Mautic API  
I get this error

```auto
{
  "errors": [
    {
      "message": "The access token provided is invalid.",
      "code": 401,
      "type": "invalid_grant"
    }
  ]
}

```

**Your software**  
My Mautic version is: 4.2.1  
My PHP version is:  
My Database type and version is:

**Your problem**  
My problem is: API Integration

These errors are showing in the log:

Steps I have tried to fix the problem: Creating another API credential, clearing cache
