This document provides information relating to HTTP status codes when using the Airship Wallet API |
This article will outline:
- Common status codes
- Short tips for troubleshooting
Common status codes and tips:
400 - Invalid Request Parameters
Invalid Request Parameters error codes can be caused by attempting to create a pass under an existing external ID. External IDs are designed to allow passes to be generated once, then updated with new data on an ongoing basis.
500 - Error reading the api key
These are similar to standard 401 Authorization required, but it can mean that the base64 authorization string is too short, or has an incorrect API key and email address combination; but for whatever reason, the authorization isn't passing.
-H "Authorization: Basic d2lsbC5jYXJsc2Y2"
Please double-check your email address and API key combination.
Authorization should be formatted like the below prior to base64 encoding:
look@me.com:60a6f77b-23ad-4f1e-9c81-dd33927e0612
A complete authorization header after base64 encoding would look like this:
-H "Authorization: Basic bG9va0BtZS5jb206NjBhNmY3N2ItMjNhZC00ZjFlLTljODEtZGQzMzkyN2UwNjEy"
406 - Not Acceptable Request
Most often these will happen due to missing data with the send. Is it a POST type sent with no valid JSON?
POST type requests will almost always need corresponding data such as the below JSON section:
-d 'json={"fronds": {}, "publicURL": {"type": "multiple"}}'
404 - The resource is no longer at that location
These can happen when you pass a correct API key but incorrect pass ID, or when trying to send a change to a pass that has not been installed to any devices.
Double-check the pass ID (please note this is not the external ID)
{"code":404,"description":"The resource is no longer at that location.","details":"object not found :Pass not found! Please pass a valid external Id instead of 1234567891011"}%
Related Content: