API auth Help

Hi All,

First, this is my first time working with API’s so please be gentle (or at least use some lube…).
My stupid problem is:

I’m trying to get an auth token but I keep getting the error:

error:"access_denied"
message:"The resource owner or authorization server denied the request."
hint:"The JWT string must have two dots"

I am using postman, please see attached screenshot.

Fixed it … the issue was :woohoo: :woohoo: :woohoo: :woohoo: mod_rewrite

Hi,

Would you mind going it bit more into detail? What have you done to fix the issue?

I have a strange thing: I have a Mautic instance (since some weeks) where authentication works fine. Now I installed a new instance on the same server where I encounter the same problem like you.

Best,

Peter

Hi Peter,

What I did was to enable URL rewrites to All in .conf file. If you open your .htaccess file you will see how the rewrite rules look like. Without mod_rewrite the app just doesn’t respond to the URL called.
You can do this by editing httpd.conf file:

sudo nano /etc/httpd/conf/httpd.conf

Find the section <directory /var/www/html> and change AllowOverride None to AllowOverride All

 <Directory /var/www/html>
    AllowOverride All
 </Directory>

Save and exit
Now restart Apache to put the change into effect:

sudo systemctl restart httpd

Please be aware that these command are for CentOS. For Debian/other please see the man for the right commands !
Let me know if this worked !
Cheers

Maybe my above answer was a bit hasty, but I do think that mod_rewrite is the issue here as you have 2 servers on the same host. See the mod_rewrite rules and modify according to your needs.

The .htaccess files for both instances are identical.

However, I luckily found the solution. The tutorial I used was not clear at one place. So I forgot to change the client_secret and therefore the error occurred.

Thanks!

Peter

Hi where is .htaccess file i am unable to find can you help me ?

can you guide me for fixing above same error for suitecrm while getting response from postman

Help me to fix this for suitecrm

First, learn to ask for help! Include OS/app versions and what you already tried.
.htaccess is a hidden file as all files preceded by “.” in *nix systems, usually in the server root folder. Use “ls -la” to show all files in a folder.
For the API to work you need to configure https and to configure suitecrm users/settings.
“Help me to fix this for suitecrm ,reply soon” ?? really dude? you really think someone executes at your command?

1 Like