Is Is Possible to Place an Authorization Header in the Get URL Action?

After dealing with tech support for our phone system - Yealink.
Trying to dial with the Get URL action, which I do just fine with Grandstream.
Their support says:
" Sorry, our R&D doesn't know how to use your tool.
Please understand that it's not our phone blocking this string, it is the browser or the tool."

I need help getting the 'authorization header' into the Get URL Action.

I appreciate any help

Usual way to do this is to use the command line curl utility, which you could execute from a KM "Execute Shell Script" action.

Build and test your curl command in the Terminal first, then you can transfer it to KM and adjust it to use KM variables if required. Type man curl in Terminal for more information, and there are loads of tutorials and examples on the web, eg "Option 2" here shows the authorisation method you are talking about.

Do Yealink provide any specific information themselves, or did they just point you at a generic Wikipedia page?

1 Like

wow, thank you for your response @Nige_S
It would be beyond great if I could get this worked out....
Here is what the Yealink support sent me:

" Enter this format in the address bar, username:password@ will be automatically filtered out by the browser, and the sent request does not contain Authorization, so the authentication fails.

You need to use the way the request carries Authorization information in the header.(You might need to figure out how to put the authorization information in the header on your tool)

cb9d0b0b715c4adc8216331668fdb204.png

(The browser address bar triggers the push method. Currently, due to the update of industry security rules, the browser may gradually no longer support it in the future.)"

This is the type of string I am trying to pass to the phones: (some numbers changed)
http://admin:admn314301012pwd@10.0.2.79/servlet?key=number=102&outgoing_uri=101@sip131-1111.ringcentral.com

I get most of your directions, but not knowledgeable about curl....
I did base64 the credentials, and came up with the following string, but don't know what to do with it.
Stupidly tried to run it in terminal and also as an execute shell script, but of course, as you already know, it didn't work because I'm missing a chunk of the directions....

curl -H 'Authorization: Basic YWRtaW46YWRtbjMxNDMwMTA0OXB3ZA==' https://10.0.2.19/servlet?key=number=102&outgoing_uri=101@sip131-1131.ringcentral.com

How are you generating this? Or is that part of your "some numbers have changed" caveat -- coz it doesn't decode to your stated username and password!

1 Like

Ah yes, I think that I changed some numbers, just for 'safety'... which is not at risk here, sorry...

Real string would be:

http://admin:admn314301049pwd@10.0.2.19/servlet?key=number=102&outgoing_uri=101@sip131-1131.ringcentral.com

I put this:

admin:admn314301049pwd

in here and I get:

YWRtaW46YWRtbjMxNDMwMTA0OXB3ZA==

To anyone interested:

@Nige_S and I have been DMing, and he has been more than generous with his time and expertise.

He has built a solution that I am working with now and I will post it here once tested and confirmed.

It will allow you to dial a VOIP phone (Yealink in this case) with an authorization header in the Get URL action.

Cheers-

1 Like

A solution has been created for dialing a Yealink VOIP phone with an 'authorization header' from Keyboard Maestro.

It is only thru the kind and diligent work of @Nige_S that this has become a reality.

Instead of posting all the details here, if you are interested, please reply on this thread or contact me directly and I will most happily provide you with the solution that @Nige_S worked up for me.

It is very powerful to be able to highlight a number in any application, or click an icon in FileMaker Pro and have it dial the phone directly by tapping a hot key.

Then tapping the hot key x2 will hang up the call.

Control over headset / speaker volume is available as well as ACTION URLs that allow KM to receive outputs from the phone to let you know what 'state' the phone is in.

Again, I can't thank @Nige_S enough for his time and expertise! A real Blessing...

Troy