Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to authenticate Databrics API using .netrc file

I have created ".netrc " file on my machine and trying below databricks rest api call. But it always giving an unauthorized error. How to create .netrc file in Databricks?

curl -n -X GET https:///api/2.0/token/list

How to use .netrc file with databricks api?

like image 269
Rohi_Dev_1.0 Avatar asked Sep 17 '25 06:09

Rohi_Dev_1.0


1 Answers

My .netrc file looks like this:

machine northeurope.azuredatabricks.net
login token
password dapicxxxxxxxxxxxxxxxxxxxxx

Machine should be the region where your workspace is deployed, login is always token and the password the token created for your user.

See Databricks documentation how to create the token.

like image 179
Hauke Mallow Avatar answered Sep 19 '25 14:09

Hauke Mallow