GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Authorization: Bearer your_auth_token (how to get auth_token) · Issue #818 · googleapis/google-cloud-node

Authorization: Bearer your_auth_token (how to get auth_token) #818

New issue
Copy link
New issue
Copy link
Closed
Closed
Authorization: Bearer your_auth_token (how to get auth_token)#818
Copy link
Assignees
stephenplusplus
Labels
api: storageIssues related to the Cloud Storage API.coretype: questionRequest for information or clarification. Not an issue.

Description

@navicore
navicore
opened on Aug 23, 2015
Issue body actions

question: will the API give me the bearer token it is using?

I'm able to create signed urls with gcloud-node but I'm trying to follow the resumable download docs. they suggest starting an upload on the server and passing the session to the client. looks easy except for the header:

Authorization: Bearer your_auth_token

can i do something like gcs.getAuth after some kind of init?

thx for any help.

Activity

Next
  1. stephenplusplus commented on Aug 24, 2015

    @stephenplusplus
    stephenplusplus
    on Aug 24, 2015
    Contributor
    More actions

    We don't have this officially supported, but there's an opening if you go through some private properties.

    With your Storage instance, try:

    var reqOpts = { uri: '...' }; // what you would pass to the request module
    
    storage.makeAuthorizedRequest_(reqOpts, {
      onAuthorized: function(err, authorizedReqOpts) {
        // authorizedReqOpts.headers.Authorization = 'bearer token'
      }
    });

    I also made a module for exactly this which uses the same authorization settings as this library: https://github.com/stephenplusplus/google-auto-auth

    I think our library could eventually add support for just starting a resumable upload, handing off the responsibility to the user to see it through. We currently support resumable uploads, but wrap the whole thing and hide away the details.

  2. jgeewax commented on Aug 24, 2015

    @jgeewax
    jgeewax
    on Aug 24, 2015 via email
    Contributor
    More actions
    Can we maybe create a ticket to allow this...? Resumable upload seems like a pretty reasonable thing to build... no?
  3. stephenplusplus commented on Aug 24, 2015

    @stephenplusplus
    stephenplusplus
    on Aug 24, 2015
    Contributor
    More actions

    Sure, new ticket it is. Thanks for bringing this issue up, @navicore!

  4. stephenplusplus
    closed this as completedon Aug 24, 2015
  5. stephenplusplus
    added
    type: questionRequest for information or clarification. Not an issue.
    api: storageIssues related to the Cloud Storage API.
    core
    on Aug 24, 2015
  6. navicore commented on Aug 24, 2015

    @navicore
    navicore
    on Aug 24, 2015
    Author
    More actions

    awesome help, thanks!

  7. stephenplusplus commented on Aug 31, 2015

    @stephenplusplus
    stephenplusplus
    on Aug 31, 2015
    Contributor
    More actions

    @navicore Since this issue, I moved all of our resumable logic into gcs-resumable-upload. You can use it to just get a resumable URI:

    var upload = require('gcs-resumable-upload');
    upload.createURI({
      bucket: 'bucket-name',
      file: 'file-name',
      authConfig: {
        // how you normally auth to gcloud, ex:
        keyFilename: 'keyfile.json'
      }
    }, function (err, uri) {});
  8. gotmikhail commented on Feb 1, 2016

    @gotmikhail
    gotmikhail
    on Feb 1, 2016
    More actions

    Is there the option to set the origin with this method? We're trying to use our API to generate a resumable uri, but the client is running on a different subdomain.

  9. stephenplusplus commented on Feb 1, 2016

    @stephenplusplus
    stephenplusplus
    on Feb 1, 2016
    Contributor
    More actions

    I think @janesconference was going to help us implement that in gcs-resumable-upload. I opened an issue about it here: googleapis/gcs-resumable-upload#6. Feel free to subscribe to that one to track the progress.

  10. gotmikhail commented on Feb 1, 2016

    @gotmikhail
    gotmikhail
    on Feb 1, 2016
    More actions

    @stephenplusplus Any other options? Ie., createWriteStream? Or, is it that setting the origin option isn't available right now at all?

  11. stephenplusplus commented on Feb 1, 2016

    @stephenplusplus
    stephenplusplus
    on Feb 1, 2016
    Contributor
    More actions

    I don't believe any other options exist, sadly. I'll work on adding support asap.

  12. JustinBeckwith
    assigned
    stephenplusplus
    on Feb 1, 2021
  13. sofisl
    added a commit that references this issue on Jan 17, 2023

    chore: start tracking obsolete files (#818)

    63c023b
  14. 1 remaining item

  15. sofisl
    added a commit that references this issue on Jan 25, 2023

    chore(deps): update dependency sinon to v12 (#818)

    d2bce20
  16. sofisl
    added 8 commits that reference this issue on Jan 27, 2026

    fix: initial module in golint presubmit check (#818)

    af0e2dc

    fix: initial module in golint presubmit check (#818)

    e3f80f2

    fix: initial module in golint presubmit check (#818)

    16cc0ba

    fix: initial module in golint presubmit check (#818)

    98d7c87

    fix: initial module in golint presubmit check (#818)

    128e903

    fix: initial module in golint presubmit check (#818)

    f8a9134

    fix: initial module in golint presubmit check (#818)

    8c943d1

    fix: initial module in golint presubmit check (#818)

    6b84f9e
  17. sofisl
    added a commit that references this issue on Mar 5, 2026

    chore(deps): update dependency jsdoc-fresh to v5 (#818)

    d90412a
  18. GautamSharda
    added a commit that references this issue on Mar 12, 2026

    chore: [node] add auto-approve templates, and install dependencies wi…

    86084f0
  19. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#818)

    83a19b6

    build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#818)

    ac1f084
  20. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#818)

    7ec66a1
  21. thiyaguk09
    added a commit that references this issue on May 5, 2026

    build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (googleapis#818)

    2d3f7e0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

api: storageIssues related to the Cloud Storage API.coretype: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.