Shopify / Shopify/shopify-app-template-node

Using Postman to test backend endpoints

Open
#1,259 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1k
Forks
434
PR merge metrics
No merged PRs in 30d

Description

Our express application is started listening on a PORT.
Using it I can call localhost:PORT/api/endpoint .
This of course fails if I do not provide a valid Bearer token.
Inspecting network calls to my application from the store admin uses Bearer authentication with JWT token that changes every time I reload the app screen or every one minute. Using it the request succeeds.

I have couple of questions:

  1. The aforementioned PORT is changing every time the application is restarted. Checking the Ngrok tunnel forwarding address the port seems to differ. Why it differs? Is there a way of making this port static for local developments? How? (Multiple questions but related, sorry)
  2. From what I understood the flow is as follow: User enters the app screen (in the Admin panel) -> FE loads skeleton-> FE sends request to app bridge -> app bridge grants session token (JWT) to FE -> FE uses token to authenticate with app BE.
    Any way to create a session token that does not expire or has a long expiration time so I can fire requests from Postman more easily?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Express application’s PORT handling, the /api/endpoint entry point, and the app bridge-to-admin-panel token flow described in the issue. Done means documenting why the local port changes, whether it can be made static, and how to obtain or use a suitable session token for Postman requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, javascript, node.js
Domain
api, authentication, backend, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.