0 votes
by (290 points)


I'm using Rebex Mail with Windev 26.

I use windev's native fonctions to retrieve a token from Microsoft.

I'm able to read the user's profile in Windev, I think my token is good.

When I use the received token with ews.login, I receive an exception error 400 bad request

Somebody have an idea ? Ask if you need the complete trace

Thanks in advance for any help


Applies to: Rebex Secure Mail

2 Answers

+1 vote
by (15.2k points)
selected by
Best answer

The OAuth token Pierre shared with us on support@rebex.net has been encoded in Unicode string (2 bytes per character). Sending that token in ASCII encoding (1 byte per character) resolved that issue.

0 votes
by (15.2k points)


do you process your token somehow before using it in Ews.Login method? Can you please share your token (base64 form) with us? You can see what your token contains on this site: https://jwt.ms/

From the "400 bad request" response I would say you are using bad token (recived form unsupported source) or a token in a bad form. I could not tell more without seeing the token and how it is used.

asked Sep 6, 2021 by (290 points) How to share my token