Skip to content

No way to use pre-existing API key #18

@tennisgent

Description

@tennisgent

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions