How do I authenticate to the API?

ddorsetddorset HudsonAlpha Institute for BiotechnologyMember

I hope this isn't a stupid question, but after reviewing the Swagger documentation and studying the API calls occurring through normal usage of the FireCloud web app, I'm ready to do start using the API. However, I'm having trouble figuring out how to obtain an auth token. In the documentation under Oauth it shows how to refresh a token, but it's not clear how to obtain that token.

Can someone please point me to the docs for that? I'm happy to RTFM if I can find TFM :smile:

Tagged:

Best Answers

  • ansinghansingh
    edited November 2018 Accepted Answer

    Hi!
    FireCloud authenticates through google - so if you're signing in from the command line, you'll have to do the following:

    auth with google using the account you have with FireCloud (this will open up your browser)
    $ gcloud auth login

    and then grab your token
    $ gcloud auth print-access-token

    you can also do the following to automatically copy the token to your clipboard instead of printing it to the console:
    $ gcloud auth print-access-token |pbcopy

    Hope that helps!

    EDIT: This assumes you have gcloud installed!

Answers

Sign In or Register to comment.