Authenticating Sugar V8 RestAPI with postman

Hi @moriuks yes I’m getting the tokens right i think. I’m using the “get new access token” from postman and i can see the token in the Oauth2 client. I think i’m having some troubles with my apliccation or DB timezone because the expiration date of the tokens that are created is before the creation date.
e. g.

Do you think this can be what is making troubles?
Thanks!

Hi @machinecha,

Do you have any errors on the suitecrm.log?

1 Like

Hi @clemente.raposo:

No, i’m not getting any errors in the suitecrm.log. I’m running in a php web server. In the web server log, i get this:
php | [Tue Nov 17 09:30:26 2020] 172.18.0.1:38084 [200]: /Api/access_token
php | [Tue Nov 17 09:30:41 2020] 172.18.0.1:38110 [301]: /V8/module/Accounts
php | [Tue Nov 17 09:30:41 2020] 172.18.0.1:38122 [404]: /V8/module/index.php?action=Login&module=Users - No such file or directory

Hey @machinecha,

Can you confirm your permissions are set correctly?

Permission of the files? The public and private key? Or permissions in general of all the files?

Hi @machinecha,

Could you try using Api/index.php/V8/module, please?

2 Likes

I think this made the magic. I’m ewntering a meeting now, will check more later, but i think this is the solution. Thanks thanks thanks!!

Glad to hear!

There may be a problem with the re-write then. Are you using apache?

1 Like

For development we use the php web server. For testing and production yes, we are using apache

Switching to PHP7.4 got this to work! If you’re using 8.0, there is a potential bug with parsing your keys.

Based on this case it is caused by an dependency issue: Generating API access token throws error:0909006C:PEM · Issue #185 · salesagility/SuiteCRM-Core · GitHub