Getting Access Denied Error While fetching Auth code and token

I have tried to test with my url for authorize context given in mautic documentation like;
campaign.swurgentcare.net
https://campaign.swurgentcare.net/oauth/v2/authorize
along with body parameters
but it does not work and give html type page response.

Moreover; I tried to call token API like
https://campaign.swurgentcare.net/oauth/v2/token
with grantytpe, client-id and other params but it gives error like:
{
“errors”: [
{
“message”: “The client credentials are invalid”,
“code”: 400,
“type”: “invalid_client”
}
]
}

=> I am using client id and secret in both APIs which i have created in API Credentials of my account dashboard. then why m getting this error. Need support for this

Regards,
Maria


Hi @swurgentcare

I haven’t used this API in a while, but I double-checked my implementation. I use a GET request like this:

{{domain}}/oauth/v2/authorize?client_id=1_4923jcw2u...&grant_type=authorization_code&redirect_uri=https://...run.app&response_type=code&state=UNIQUE_STATE_STRING

Hope this helps.

Greetings
Adrian

And I just noticed that you have the client_id checkbox deactivated in the printscreen of your second (token) request. Maybe you want to activate that parameter?

As I have followed the same request as given by you, but still it gives me html page response

Can you guide me regarding redirect_uri and state param values? Am I passing them right way. Although state is optional, and has not much affect may be, but what about redirect_uri. my dashboard url is campaign.swurgentcare.net , what would be redirect_uri then
My Request is like;
curl --location ‘Mautic

I got the token now by calling it directly from Authorization option in postman, having option Get New Access Token, but still unable to call /authorize api and to get json response having access_token.

CURL Command I tried:
curl --location ‘Mautic


1 Like

I am unable to call /authorize api and to get json response having access_token.
You can try connecting with Wix Pro Agency to solve this issue: Visit them here https://www.wix-pro.com.au/booking-calendar