3
Return Token API
Problem reported by Gustavo Leal - 10/30/2020 at 10:33 AM
Not A Problem
Good afternoon!

I've been trying in several ways to obtain the token to operate the API, but even following the insufficient examples in the manual, I am not successful.

Would anyone have a working example of how to get the token?

I've tried,

-
https://mail.XXXX.pt/api/v1/auth/refresh-token?{"token"= REFRESH_TOKEN_STRING} 
Return ({
    "isImpersonating": false,
    "canViewPasswords": false,
    "accessToken": "",
    "refreshToken": "",
    "accessTokenExpiration": null,
    "username": null,
    "success": false,
    "resultCode": 400,
    "message": "Object reference not set to an instance of an object."
})

-
https://mail.XXXX.pt/api/v1/auth/retrieve-login-token?{=&"username"=gustavo,&"domain"=mail.XXXX.net,&}
 I have the return (" Missing token in authorization header ")

-
https://mail.XXXX.pt/api/v1/auth/authenticate-user?{=&"username"=gustavo,&"password"=PASS,&"language"=en,&"retrieveAutoLoginToken"=true&}
 I have the return ({"message": "Validation errors: [invalid, Invalid input parameters]"})

Does anyone have any ideas ?

Complementing: I tested with POSTMAN and via console with JQUERY as manual.
Thanks in advance

Gustavo Leal
gustavoleal@cloudbyte.pt

2 Replies

Reply to Thread
0
Andy Whitefield Replied
We're getting this same message  ({"message": "Validation errors: [invalid, Invalid input parameters]"})  on two of our computers for about the last 6 weeks - and we can't get in to either of our smartermail accounts on those machines. Did you ever get this sorted Gustavo? We are very very perplexed. Thanks Andy and Sara
0
Zach Sylvester Replied
Employee Post
Hello,


To get the auth and refresh token you just need to pass in the username and password to the correct url with a post request. Please let me know if this helps. 

Best regards, 
Zach Sylvester Software Developer SmarterTools Inc. www.smartertools.com

Reply to Thread