I have created a URL with Access Token. When I open the URL, the + operator get removed with whitespace from the token at backend end-points. Can someone help me to know why this happening? Below is my URL with the token.
At controller level, token is recieved as
When I open the URL, the + operator get removed with white-space from the token at backend end-points.
Yes, that’s because in URLs,
+ is the used to represent a space. I suspect your token is actually a base64-encoded value – you should use a URL-safe base64 decodabet instead of just putting the regular base64 value directly into the query. If you must use the regular base64 one, you need to escape the
+ character as
%2B. I’d suggest using
HttpUtility.UrlEncode to do that.
Answered By – Jon Skeet
Answer Checked By – Mildred Charles (BugsFixing Admin)