Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to use pre-existing API key #18

Closed
tennisgent opened this issue Mar 6, 2017 · 0 comments
Closed

No way to use pre-existing API key #18

tennisgent opened this issue Mar 6, 2017 · 0 comments

Comments

@tennisgent
Copy link
Contributor

tennisgent commented Mar 6, 2017

What's the point of having a .getAPIKey(...) method if you still have to hard code a username and password into the code in order to retrieve it? Why not just call .login(...) instead?

I need a way to set an API key that I've already pull from Workfront. Something like:

instance.setAPIKey('bjrm6v5ef79zpe3...qe8go');
instance.search('optask', {...}, ['*'])
    .then(data => ...)
    .catch(err => ...);

Any idea when we could expect something like that? I know a current workaround is:

instance.httpParams.apiKey = 'bjrm6v5ef79zpe3...qe8go';
instance.search('optask', {...}, ['*'])
    .then(data => ...)
    .catch(err => ...);

But that's a less than elegant...

citizensas pushed a commit that referenced this issue May 29, 2021
fix (closes #18): Added setAPIKey method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant