cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unsupported authentication mechanism error

jcamps
Advisor

Hi all,

calling the REST API I'm gettin this response:

{"error":{"code":401,"message":"Unsupported authentication mechanism -> 'Basic', could not be used as fallback."}}

The request was something like this:

https://wxv699.dynatrace-managed.com/e/6fa686ce-5f7e-4a27-a076-1e86dd547c9c/api/config/v1/dashboards...

Putting this request in my browser works fine but from curl in another machine I'm getting the "Unsupported authentication mechanism" message.

My suspicion is that dynatrace, in the second case, is not receiving the Api-Token parameter well for some reason, so where can I see the request that is coming to Dynatrace in order to verify id the Api-Token parameter is coming correctly?

Regards, Josep Maria

4 REPLIES 4

skrystosik
DynaMight Guru
DynaMight Guru

You cannot see on Dynatrace site requests that are executed via API. About using curl, maybe you have something wrong in headers, because Basic auth mentioned here is in header. In general you don't have to pur token in url you can put it in header:

https://www.dynatrace.com/support/help/shortlink/api-authentication#authenticate

Here you have proper example for curl.

Sebastian

Regards, Sebastian

Hi Sebastian,

thanks for your response, the problem in this case was in CURL with the dashboard timeframe especified between the URI and the Api-Token parameter:

The URL was https://wxv699.dynatrace-managed.com/e/6fa686ce-5f7e-4a27-a076-1e86dd547c9c/api/config/v1/dashboards...

CURL doesn't understand the ;gtf=l_2_HOURS;gf=all part and doesn't send de Api-Token to the server.

So, how can specify the timeframe in order to work well with CURL?

Regards, Josep Maria

As I said, put your token into header and you will not have problems with params in url.
Regards, Sebastian

Thanks Sebastian!

Featured Posts