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

How to access the Tracking API? #28

Open
jat255 opened this issue Mar 27, 2024 · 8 comments
Open

How to access the Tracking API? #28

jat255 opened this issue Mar 27, 2024 · 8 comments

Comments

@jat255
Copy link

jat255 commented Mar 27, 2024

I have created an app in the developer portal, and only see the following options for "selecting an API":

image

When I obtain an OAuth token from the v3 endpoint, I receive the following response:

{
  "access_token": "abcd1234",
  "token_type": "Bearer",
  "issued_at": 1711509594428,
  "expires_in": 28799,
  "status": "approved",
  "scope": "international-prices addresses service-standards prices",
  "issuer": "api.usps.com",
  "client_id": "abcd1234",
  "application_name": "MyApp",
  "api_products": "[Shipping Default]",
  "public_key": "abcd1234"
}

As shown, the tracking scope is not included in the response, and when I try to issue a GET request to https://api.usps.com/tracking/v3/tracking/{{tracking_number}}?expand=summary, I receive the following error response:

{
  "apiVersion": "/tracking/v3",
  "error": {
    "code": "401",
    "message": "",
    "errors": []
  }
}

Is there any way to access the tracking API to track packages via the API? I see the API documented here, but can't seem to access it.

Also, I have tried supplying "scope": "tracking" in my OAuth token POST request, but that doesn't seem to work and I receive the following token response (with an empty scope value):

{
  "access_token": "abcd1234",
  "token_type": "Bearer",
  "issued_at": 1711509594428,
  "expires_in": 28799,
  "status": "approved",
  "scope": "",
  "issuer": "api.usps.com",
  "client_id": "abcd1234",
  "application_name": "MyApp",
  "api_products": "[Shipping Default]",
  "public_key": "abcd1234"
}

Any help here would be great.

@jat255
Copy link
Author

jat255 commented Mar 27, 2024

@stevenfdearborn any ideas here? I noticed that when I create an app on developer-cat.usps.com, it gets given access to the "[Shipping Version 3]" API product, rather than the "[Shipping Default]" product that developer.usps.com assigns. Is there a reason this is different?

@grakes87
Copy link

grakes87 commented Apr 9, 2024

were you able to figure this out? I'm having the same issue.

@jat255
Copy link
Author

jat255 commented Apr 9, 2024

@grakes87 Nope. I emailed their support twice with no response, and nothing here either. Not sure what else I could do at this point

@nandorholozsnyak
Copy link

I'm in the same situation but with the Locations API. Support does not reply for any mails... :(

@jat255
Copy link
Author

jat255 commented Apr 13, 2024

Pinging @stevenfdearborn again. Is this API supported? It's difficult to build applications against it without any feedback/support.

@verbunk
Copy link

verbunk commented Jul 15, 2024

I'm in the same boat - in my case my App Product is "Public Access I" and gives by default,

"scope": "addresses international-prices service-standards prices shipments",

If I manually request "scope":"tracking" it comes back empty. There are no other App Products I can select using https://developer.usps.com login and app account management.

@rileyzDakota
Copy link

Has anyone solved this? I'm in the same boat as verbunk.

  • App Product is "Public Access I"
  • 'scope': 'addresses international-prices service-standards prices shipments'

@verbunk
Copy link

verbunk commented Aug 9, 2024

Hey Everyone - The path forward is to create a business account and email their dev support team for access. You will be asked to fill out a google forms doc with extra information and then some QA on why you need this, also, inexplicably the google docs from will require 400% cpu for all ~6 pages. The scope is intentionally not provided in the default. I guess (hinting in email) they will add the scope AND some monitoring to prevent abuse of the endpoint.

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

5 participants