Unauthorized error when accessing files through API

Posted in API by Susanna Chen Thu Mar 08 2018 19:39:10 GMT+0000 (Coordinated Universal Time)·1·Viewed 1,374 times

I am attempting to access project output files through the CGC API. I am using the sevenbridges python package. I have run the code provided on the documentation for accessing projects with initialization via environment variables (https://pypi.python.org/pypi/sevenbridges-python). However, an Unauthorized error is returned. I have double checked and the authentication token I am using is correct. What would be the reason for this?
Mar 10, 2018

We have received your inquiry regarding accessing project output files through the CGC API.

Could you please check if you have set up the following API ENDPOINT:

import sevenbridges as sbg
import os

os.environ['SB_API_ENDPOINT'] = 'https://cgc-api.sbgenomics.com/v2'
os.environ['SB_AUTH_TOKEN'] = '<TOKEN_HERE>'

api = sbg.Api()

Also, you can find active token on the following link:

If you have already used all of this, could you please provide us your username that you use to access CGC platform to mail [email protected]

In the meantime, I am also adding following documentation which may help you:

Markdown is allowed