Authorization header for SMS API

Han Wer4 years ago

Hello,

does anyone know if an authorization header in the below form can be created for SMS API requests?

Authorization: MAC id="your API key", ts="1325376000", nonce="random-string", mac="base64-encoded-hash" 

That scheme is based on this OAuth 2 specification http://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01

Anton Tananaev4 years ago

I think you can pass any value.

Han Wer4 years ago

But how would I get them within the traccar config?

Han Wer4 years ago

I went through https://www.traccar.org/http-sms-api/ but unfortunately I can not find any config options that would provide variables like timestamp, nonce (random string).
Does anyone have an idea?

Anton Tananaev4 years ago

What if you hardcode those values? It doesn't work?

Han Wer4 years ago

How can timestamp be hardcoded that needs to be the execution time and changes every time? also it expects a changing random number. Otherwise you are right and I would have tested that.