Skip to content

Accessing APIs from both application and postman - team and token verification #1909

Open
@pranavig

Description

@pranavig

Continuing from Previous Issue

Hi, I want one of the APIs to be also used with a postman / curl along with website session access.

If I generate the API key from login and use it with postman, its only working once. the second call throws the unauthorised error. Is there a way to generate long running tokens in this saas-starter-kit ?

Additionally, the pages/api/** files have validation for team verification like below. How does this work for postman API calls ? I don't want to comment out this code as the web application still needs this validation.

const teamMember = await throwIfNoTeamAccess(req, res);
throwIfNotAllowed(teamMember, 'team_member', 'read');

Is there any other alternative to implement this approach ?

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