API Dataset Export Issue


I've been trying to use the below example to export a dataset from a browser URL bar.


GET https://api.domo.com/v1/datasets/317970a1-6a6e-4f70-8e09-44cf5f34cf44/data?includeHeader=true&fileName=Q4_Sales_Data.csv 
Accept: text/csv
Authorization: bearer <your-valid-oauth-access-token>

I've put in my own dataset code and my API key but every time I run it I get the following error.


{"status":401,"statusReason":"Internal Server Error","path":"/v1/datasets/74266a90-4ebb-4417-aad7-b52ca99e407e/data","message":"com.domo.bedrock.service.exception.UnauthorizedException: Full authentication is required to access this resource","toe":"HVURVVTBIG-UT8IM-KEHK2"}


I've also tried running it through a API VBA get function that i've had work with other API in the past without any luck. I'm not sure what I am missing. Does anyone know how to get this to work? 


Any help would be greatly apprecaited.


  • laura_igl

    Can anyone help with this request?


  • zcameron
    zcameron Domo Employee

    You won't be able to hit that endpoint from a browser URL as it requires the use of the Authorization header being added to the HTTP request. You could use a tool like cURL or Postman or a programming language to do it, however. 


    It's a two step process. First you have to hit the endpoint to authenticate with the API using your ClientID and ClientSecret created at developer.domo.com. The response from that call will contain the token needed in the Authorization header for subsequent calls.


    This process is outlined here: https://developer.domo.com/docs/authentication/overview-4 Give it a look and see if you still have questions afterwards.

This discussion has been closed.