This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I have to following code:
EncodedCredentials = Binary.ToText(Text.ToBinary("client_id" & ":" & client_id, "username" & ":" & username,
"client_secret" & ":" & client_secret, "grant_type" & ":" & grant_type,
BinaryEncoding.Base64)),
data = Json.Document(Web.Contents(api_url,
[
Headers = [#"Content-Type"="application/x-www-form-urlencoded"],
Content=Text.ToBinary(EncodedCredentials)
]
)
)where I need to send 5 parameters. I am getitng tthis error:
5 arguments were passed to a function which expects between 1 and 3.
Any what tha is?
Thanks
Solved! Go to Solution.
Hi @Markzolotoy
Your call to Text.ToBinary has too many arguments.
You should be supplying a string and an encoding type but you are supplying several strings because you are splitting them up with commas.
Text.ToBinary("client_id" & ":" & client_id, "username" & ":" & username, "client_secret" & ":" & client_secret, "grant_type" & ":" & grant_type, BinaryEncoding.Base64)
Remove the commas and make just a single string as the first argument. Something like this
Text.ToBinary("client_id" & ":" & client_id & ",username" & ":" & username & ",client_secret" & ":" & client_secret & ",grant_type" & ":" & grant_type, BinaryEncoding.Base64)
The exact format will depend on what your API requires.
regards
Phil
Proud to be a Super User!
While I am not getting the rrror anymore the backend still returns 400. That's why I am asking about Fiddler in the other thread.
Hi @Markzolotoy
Your call to Text.ToBinary has too many arguments.
You should be supplying a string and an encoding type but you are supplying several strings because you are splitting them up with commas.
Text.ToBinary("client_id" & ":" & client_id, "username" & ":" & username, "client_secret" & ":" & client_secret, "grant_type" & ":" & grant_type, BinaryEncoding.Base64)
Remove the commas and make just a single string as the first argument. Something like this
Text.ToBinary("client_id" & ":" & client_id & ",username" & ":" & username & ",client_secret" & ":" & client_secret & ",grant_type" & ":" & grant_type, BinaryEncoding.Base64)
The exact format will depend on what your API requires.
regards
Phil
Proud to be a Super User!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 25 | |
| 21 | |
| 14 |
| User | Count |
|---|---|
| 50 | |
| 46 | |
| 23 | |
| 18 | |
| 18 |