You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried accessing the API with public data of the website, but was not able to get all the necessary cookies. I realized that the app will need to send all of the required cookies to function, thus decrypted the requests.
I used <REDACTED> to indicate values that I omitted due to privacy reasons.
Dig into the apps logs
Using PCAPdroid I was able to decrypt the apps requests and payloads.
Retrieve a receipt
Using GET https://mobile-app.migros.ch/app/products/receipts/<REDACTED> HTTP/2.0
with headers
To get a list of reciepts we can use https://mobile-app.migros.ch/order/receipts/list/2024-01-01 to get
{
"class": [
"receipt.list"
],
"properties": {},
"entities": [
{
"class": [
"receipt.thumbnail"
],
"properties": {
"id": "<REDACTED>",
"timestamp": "<REDACTED>+02:00",
"storeName": "M Märt Shop Ville Zürich HB",
"totalAmount": "5.95",
"preciseTotalAmount": 595,
"accessibilityLabel": "Kassenbon vom Montag, <REDACTED> in M Märt Shop Ville Zürich HB, 5 Franken 95 Rappen ausgegeben, 5.95 Punkte gesammelt",
"cumulusPoints": "5.95",
"preciseCumulusPoints": 595
},
"entities": [],
"actions": [],
"links": [
{
"rel": [
"html"
],
"href": "https://mobile-app.migros.ch/app/receipts/<REDACTED>/html"
},
{
"rel": [
"products"
],
"href": "https://mobile-app.migros.ch/app/products/receipts/<REDACTED>"
}
]
},
{
"class": [
"receipt.thumbnail"
],
"properties": {
"id": "<REDACTED>",
"timestamp": "<REDACTED>+02:00",
"storeName": "M Märt Shop Ville Zürich HB",
"totalAmount": "5.95",
"preciseTotalAmount": 595,
"accessibilityLabel": "Kassenbon vom Donnerstag, <REDACTED> in M Märt Shop Ville Zürich HB, 5 Franken 95 Rappen ausgegeben, 5.95 Punkte gesammelt",
"cumulusPoints": "5.95",
"preciseCumulusPoints": 595
},
"entities": [],
"actions": [],
"links": [
{
"rel": [
"html"
],
"href": "https://mobile-app.migros.ch/app/receipts/<REDACTED>/html"
},
{
"rel": [
"products"
],
"href": "https://mobile-app.migros.ch/app/products/receipts/<REDACTED>"
}
]
}
],
"actions": [],
"links": []
}
Cookies
The app-login-id seems to be the most important cookie. I'm not sure if this alone might be enough to access at least some data. It is noteworthy that this cookie is very short lived (couple of minutes). There are other cookies necessary to renew it every so often. This makes the whole approach very cumbersome and not usable for any real-world use for now. If we can figure out the renewal process, it might be a easy way to access the API.
The text was updated successfully, but these errors were encountered:
This is great. I want to add, that the Authorization: Bearer [token] will probably also be necessary. I assume the call doesn't work if you leave that out.
I'm having issues with PCAPDroid on my phone (because it keeps crashing the Migros App), so this is really appreciated.
Migros App
I tried accessing the API with public data of the website, but was not able to get all the necessary cookies. I realized that the app will need to send all of the required cookies to function, thus decrypted the requests.
I used <REDACTED> to indicate values that I omitted due to privacy reasons.
Dig into the apps logs
Using PCAPdroid I was able to decrypt the apps requests and payloads.
Retrieve a receipt
Using
GET https://mobile-app.migros.ch/app/products/receipts/<REDACTED> HTTP/2.0
with headers
I was able to retrieve the reciept
List of reciepts
To get a list of reciepts we can use
https://mobile-app.migros.ch/order/receipts/list/2024-01-01
to getCookies
The
app-login-id
seems to be the most important cookie. I'm not sure if this alone might be enough to access at least some data. It is noteworthy that this cookie is very short lived (couple of minutes). There are other cookies necessary to renew it every so often. This makes the whole approach very cumbersome and not usable for any real-world use for now. If we can figure out the renewal process, it might be a easy way to access the API.The text was updated successfully, but these errors were encountered: