Skip to content

Bus Data API Integration Example #2

@viktorhex

Description

@viktorhex

Hey, it's me again! I'm testing an integration with the njtransit API and I'm getting an error even though I'm following the docs. Any idea what I'm doing wrong?

https://github.com/viktorhex/njtransit-tracker/blob/main/src/api/njtransit.ts#L86

Example in a curl request:

curl -X 'POST' \
  'https://testpcsdata.njtransit.com/api/BUSDV2/getLocations' \
  -H 'accept: text/plain' \
  -H 'Content-Type: multipart/form-data' \
  -F 'token=63885160**********' \
  -F 'mode=ALL'

Response I'm getting:

    data: {
      errorMessage: "User not known or not allowed.",
    },

Note: authenticating my user works fine, and I can retrieve tokens.

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