![]() ![]() Try instead to use this method for encoding your credentials: $Text = ::UTF8.GetBytes($Text) I also tried with double quotes instead of single, but that doesn't seem to make a difference. I suspect this might be due to the use of the unicode.getbytes instead of the UTF8 we are expecting here. ZgBpAHIAcwB0AC4AbABhAHMAdABAAG0AeQBkAG8AbQBhAGkAbgAuAGMAbwBtADoAPABtAHkAQQBQAEkASwBlAHkAPgA=īut as you can see, your example is encoding this string much differently. PS C:\Users\IEUser> $base64 = ::ToBase64String($baseBytes) PS C:\Users\IEUser> $baseString = C:\Users\IEUser> $baseBytes = ::Unicode.GetBytes($baseString) Zmlyc3QubGFzdEBteWRvbWFpbi5jb206PG15QVBJS2V5Pg= PS C:\Users\IEUser> $EncodedText = ::ToBase64String($Bytes) ![]() PS C:\Users\IEUser> $Text = C:\Users\IEUser> $Bytes = ::UTF8.GetBytes($Text) In order for this to work correctly I'd expect the same output Windows PowerShellĬopyright (C) 2009 Microsoft Corporation. To highlight this difference I used an example string of and in the first example I used the documented method, and the second I used your method. You are using the base64 encoded string of emailaddress:API_Token, however the way you encode that string is technically different from the way we state to encode it in our Basic Auth for REST APIs documentation. I took a closer look at your steps to make this work and I believe I see the problem here. I see that you're using Powershell in order to try to make a REST API call to a Jira Cloud site, but that this is not working as expected.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |