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

Change Brave Ads endpoints from v2 to v3 #27211

Closed
tmancey opened this issue Dec 7, 2022 · 2 comments · Fixed by brave/brave-core#16273
Closed

Change Brave Ads endpoints from v2 to v3 #27211

tmancey opened this issue Dec 7, 2022 · 2 comments · Fixed by brave/brave-core#16273
Assignees
Labels
enhancement feature/ads OS/Android Fixes related to Android browser functionality OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass - Android Tab QA Pass-Linux QA/Yes release-notes/exclude

Comments

@tmancey
Copy link
Contributor

tmancey commented Dec 7, 2022

No description provided.

@btlechowski
Copy link

Verification passed on

Brave 1.48.125 Chromium: 109.0.5414.87 (Official Build) beta (64-bit)
Revision 2dc18eb511c56e012081b4abc9e38c81c885f7d4-refs/branch-heads/5414@{#1241}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#16273

GET /v3/issuers/

[6517:6517:0118/181914.496428:VERBOSE1:issuers.cc(60)] FetchIssuers
[6517:6517:0118/181914.497422:VERBOSE2:issuers.cc(61)] GET /v3/issuers/
[6517:6517:0118/181914.498357:VERBOSE6:issuers.cc(65)] URL Request:
  URL: https://static.ads.brave.com/v3/issuers/
  Method: kGet

image

PUT /v3/confirmation/payment/{paymentId}

[7702:7702:0119/183213.017143:VERBOSE1:redeem_unblinded_payment_tokens.cc(105)] RedeemUnblindedPaymentTokens
[7702:7702:0119/183213.017574:VERBOSE2:redeem_unblinded_payment_tokens.cc(113)] PUT /v3/confirmation/payment/{paymentId}
[7702:7702:0119/183213.018176:VERBOSE6:redeem_unblinded_payment_tokens.cc(126)] URL Request:
  URL: https://mywallet.ads.brave.com/v3/confirmation/payment/a135b4f1-0c1b-5d28-aa61-e904c57066e9
  Content: {"odyssey":"host","payload":"{\"paymentId\":\"a135b4f1-0c1b-5d28-aa61-e904c57066e9\"}","paymentCredentials":[{"confirmationType":"view","credential":{"signature":"RrjtnsSmKa0yE4kM+m/MR1nwRNRqTI/ppKqwmxKnukeSgl5jpaaEbNuTGS0Ogd7AAKa62jkc0cJb/fTO+iTR6Q==","t":"CrIMT4FFAVuVbUBUW9m74ILwoCjDFvyx8JLoSgD3rtIX8r94ZAxwjg1BDWkAXZui/8x1HNZOKkVHcWcvUpGQeA=="},"publicKey":"Mljxb+QtKKaf8+CUMsEBdNoh6HjrU/8zoe6P9wgMYB0="}],"platform":"linux","totals":[{"ad_format":"new_tab_page_ad","view":"1"}]}
  Content Type: application/json
  Method: kPut
[7702:7702:0119/183213.322274:VERBOSE1:redeem_unblinded_payment_tokens.cc(139)] OnRedeemUnblindedPaymentTokens
[7702:7702:0119/183213.323127:VERBOSE6:redeem_unblinded_payment_tokens.cc(141)] URL Response:
  URL: https://mywallet.ads.brave.com/v3/confirmation/payment/a135b4f1-0c1b-5d28-aa61-e904c57066e9
  Response Status Code: 200
  Response: {"message":"Ok","status":200}
[7702:7702:0119/183213.325587:VERBOSE1:redeem_unblinded_payment_tokens.cc(154)] Successfully redeemed unblinded payment tokens

image

POST /v3/confirmation/{transactionId}/{credential}

[7702:7702:0119/183154.054050:VERBOSE1:redeem_unblinded_token.cc(51)] Redeem unblinded token
[7702:7702:0119/183154.062018:VERBOSE1:redeem_unblinded_token.cc(72)] CreateConfirmation
[7702:7702:0119/183154.062583:VERBOSE2:redeem_unblinded_token.cc(73)] POST /v3/confirmation/{transactionId}/{credential}
[7702:7702:0119/183154.062951:VERBOSE6:redeem_unblinded_token.cc(77)] URL Request:
  URL: https://anonymous.ads.brave.com/v3/confirmation/c7976a4b-1343-4c92-9d31-cbeb69f4b7ed/eyJzaWduYXR1cmUiOiJTemJVRmdsOXV3akNxTHFXTGExYy9UeXFiZkhranVFNUQrUkdxSXNaQXBtcXA5VUZPTlZaTzlCVlRGT2V5R1FWWitUS1MyelN5WWFFQUZCSXh1ZW9sdz09IiwidCI6IldEVmhmK3l6ejRjUEpORVRlL2htdW5OU2ZzV3Nhak00dUhieVpGbXVIdHFXNHZCT0dxaVRWL1Rlb3dUSXArYkpkZ2FxTWRGZTdxeittN0F4dkJqUFFBPT0ifQ==
  Content: {"blindedPaymentTokens":["Nj94cGT8rcW1SjH2hHGOetdBHySX9hmRwPObMuc55X8="],"buildChannel":"beta","catalog":[{"id":"c31700b786786a54b5c1ba85fe96e74c896312d5"}],"createdAtTimestamp":"2023-01-19T18:00:00.000Z","creativeInstanceId":"17496e85-c94d-4796-a6d6-0e1743450794","odyssey":"host","platform":"linux","publicKey":"oMx8hW6w8w/AUGoJMAMbrdeV1FoqrRkoR3BVa+5lDDk=","rotating_hash":"hsu4HgweAO6mrPX36vjDYmTZzhpNMaH5xIn0g5QC52c=","studies":[],"systemTimestamp":"2023-01-19T18:00:00.000Z","transactionId":"c7976a4b-1343-4c92-9d31-cbeb69f4b7ed","type":"view","versionNumber":"109.0.5414.87"}
  Content Type: application/json
  Method: kPost

image

GET /v3/confirmation/{transactionId}/paymentToken

[7702:7702:0119/183154.344609:VERBOSE1:redeem_unblinded_token.cc(119)] FetchPaymentToken
[7702:7702:0119/183154.344922:VERBOSE2:redeem_unblinded_token.cc(120)] GET /v3/confirmation/{transactionId}/paymentToken
[7702:7702:0119/183154.345070:VERBOSE6:redeem_unblinded_token.cc(124)] URL Request:
  URL: https://anonymous.ads.brave.com/v3/confirmation/c7976a4b-1343-4c92-9d31-cbeb69f4b7ed/paymentToken
  Method: kGet

image

GET /v3/confirmation/token/{paymentId}?nonce={nonce}

[6517:6517:0118/181915.322226:VERBOSE1:refill_unblinded_tokens.cc(184)] GetSignedTokens
[6517:6517:0118/181915.322295:VERBOSE2:refill_unblinded_tokens.cc(185)] GET /v3/confirmation/token/{paymentId}?nonce={nonce}
[6517:6517:0118/181915.322478:VERBOSE6:refill_unblinded_tokens.cc(189)] URL Request:
  URL: https://mywallet.ads.brave.com/v3/confirmation/token/d801be1e-b4c3-59eb-a592-f351e8ab37c0?nonce=ecb82d6b-a63c-4fc4-975b-aadb152deebe
  Method: kGet

image

POST /v3/confirmation/token/{paymentId}

[6517:6517:0118/181914.820139:VERBOSE1:refill_unblinded_tokens.cc(113)] Refill unblinded tokens
[6517:6517:0118/181914.820368:VERBOSE1:refill_unblinded_tokens.cc(123)] RequestSignedTokens
[6517:6517:0118/181914.820483:VERBOSE2:refill_unblinded_tokens.cc(124)] POST /v3/confirmation/token/{paymentId}
[6517:6517:0118/181914.827220:VERBOSE6:refill_unblinded_tokens.cc(134)] URL Request:

image

@btlechowski
Copy link

Verification passed on Brave v1.48.151 on Lenovo TB-8506FS (Android 11.0)

Verified test plan from brave/brave-core#16273

GET /v3/issuers/

15:38:31.007  V  [VERBOSE1:issuers.cc(60)] FetchIssuers
15:38:31.008  V  [VERBOSE2:issuers.cc(61)] GET /v3/issuers/
15:38:31.008  V  [VERBOSE6:issuers.cc(65)] URL Request:
                   URL: https://static.ads.brave.com/v3/issuers/
                   Method: kGet

PUT /v3/confirmation/payment/{paymentId}

15:49:20.368  V  [VERBOSE1:redeem_unblinded_payment_tokens.cc(105)] RedeemUnblindedPaymentTokens
15:49:20.369  V  [VERBOSE2:redeem_unblinded_payment_tokens.cc(113)] PUT /v3/confirmation/payment/{paymentId}
15:49:20.369  V  [VERBOSE6:redeem_unblinded_payment_tokens.cc(126)] URL Request:
                   URL: https://mywallet.ads.brave.com/v3/confirmation/payment/460a2fa3-3cb5-548c-acc5-dbd7fa6e59f5
                   Content: {"odyssey":"host","payload":"{\"paymentId\":\"460a2fa3-3cb5-548c-acc5-dbd7fa6e59f5\"}","paymentCredentials":[{"confirmationType":"view","credential":{"signature":"nQuz9TKJm/EGCygDnftYTbamaocdeDeHmPAxJ9jQueMnPTXMFC5IagVcfZrn9cv09EsOYmUH8IzMRXWO8sXxPA==","t":"VMbn9l+9eZu91MZWNKKRX4U3elQiT3F6vi1IeJDg2/GLEUtr2Stlp/WQELu5SBRbQwWga21bKyk3SYQ4NaHYEA=="},"publicKey":"ZuVWlXTEqCDchcIwdaHN216JlU9kmi9Ugp00fpXbPyg="}],"platform":"android","totals":[{"ad_format":"ad_notification","view":"1"}]}
                   Content Type: application/json
                   Method: kPut

POST /v3/confirmation/{transactionId}/{credential}

15:42:30.753  V  [VERBOSE1:redeem_unblinded_token.cc(72)] CreateConfirmation
15:42:30.753  V  [VERBOSE2:redeem_unblinded_token.cc(73)] POST /v3/confirmation/{transactionId}/{credential}
15:42:30.754  V  [VERBOSE6:redeem_unblinded_token.cc(77)] URL Request:
                   URL: https://anonymous.ads.brave.com/v3/confirmation/81e48eb2-4a7f-4b2a-8db4-96dea87cc5fa/eyJzaWduYXR1cmUiOiIxMVQwRXQrUWo4TnlPMFd1d2djRmE1VngwLzE4S3dnVWZFK214aVhZWGxBcWdsODdwaGlCeWh3anAxQ2ljSzJaOXhKd1cwVGI5bTdRYTZWd0tvWllFQT09IiwidCI6Ijc5YnQ5N0p5Wm0yc2Q5eFYvL1czZkU1SzFDaERBT1REWnVCNXhsdFFLai81YnpPRXRVRGVyRTg5WDU4TnlPOE1vME4rcTNTdmI2VFNjWlNPc0NLTERBPT0ifQ==
                   Content: {"blindedPaymentTokens":["wFBnULvd1sh67tBOfqCUW/VUyC0FEVzt7BHL6sBaRU8="],"buildChannel":"beta","catalog":[{"id":"0ba40cf41727b325fdd2f6ad47bb1b44c82d23ef"}],"createdAtTimestamp":"2023-02-07T14:00:00.000Z","creativeInstanceId":"0210de7e-2a7a-4ba7-af73-960acaac63fe","odyssey":"host","platform":"android","publicKey":"oMx8hW6w8w/AUGoJMAMbrdeV1FoqrRkoR3BVa+5lDDk=","rotating_hash":"/gY9tGT+sNxgJNFLQ7jNWK0kXEZzTGdnTPlOv1nYtJY=","studies":[{"group":"Triggers=NTPSI/TimeWindow=15m/Threshold=0.0/IdleTimeThreshold=5s","name":"BraveAds.UserActivityStudy"}],"systemTimestamp":"2023-02-07T14:00:00.000Z","transactionId":"81e48eb2-4a7f-4b2a-8db4-96dea87cc5fa","type":"view","versionNumber":"109.0.5414.119"}
                   Content Type: application/json
                   Method: kPost

GET /v3/confirmation/{transactionId}/paymentToken


15:42:31.045  V  [VERBOSE1:redeem_unblinded_token.cc(119)] FetchPaymentToken
15:42:31.045  V  [VERBOSE2:redeem_unblinded_token.cc(120)] GET /v3/confirmation/{transactionId}/paymentToken
15:42:31.046  V  [VERBOSE6:redeem_unblinded_token.cc(124)] URL Request:
                   URL: https://anonymous.ads.brave.com/v3/confirmation/81e48eb2-4a7f-4b2a-8db4-96dea87cc5fa/paymentToken
                   Method: kGet

GET /v3/confirmation/token/{paymentId}?nonce={nonce}

15:38:31.728  V  [VERBOSE1:refill_unblinded_tokens.cc(184)] GetSignedTokens
15:38:31.728  V  [VERBOSE2:refill_unblinded_tokens.cc(185)] GET /v3/confirmation/token/{paymentId}?nonce={nonce}
15:38:31.729  V  [VERBOSE6:refill_unblinded_tokens.cc(189)] URL Request:
                   URL: https://mywallet.ads.brave.com/v3/confirmation/token/460a2fa3-3cb5-548c-acc5-dbd7fa6e59f5?nonce=d4d1f8d4-7e7c-4fe5-9e7f-e46558d41bd0
                   Method: kGet

POST /v3/confirmation/token/{paymentId}

15:38:31.145  V  [VERBOSE1:refill_unblinded_tokens.cc(123)] RequestSignedTokens
15:38:31.146  V  [VERBOSE2:refill_unblinded_tokens.cc(124)] POST /v3/confirmation/token/{paymentId}
15:38:31.214  V  [VERBOSE6:refill_unblinded_tokens.cc(134)] URL Request:
                   URL: https://mywallet.ads.brave.com/v3/confirmation/token/460a2fa3-3cb5-548c-acc5-dbd7fa6e59f5
                   Content: {"blindedTokens":["fDZKUU9p8mJ1socUvmjfPD5jywQ+ivnRfDvtfyM8kXI=","FD/AmsVhu4rNYfczauMTu8zA8VBqZPbVrhEQ5kZQOzk=","MMNFK6oFKP+hurgH8a6wh1tUDHkm9uMRiesbph7xlz8=","3jN/x3ZkuO7qSMtMmSXm+0mEWOaZb3v7889NFys0xjM=","en92zJBNO9AJuHGyiKp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v22QFVA=","YBgm2ObrNlFIzCW279xgsSea/dt3sC2PFY9CKoV8HFM=","dg3lNmFRUMWY9giwsVJ1WiawIU/FSYHZ9t2yXe9o0SA=","jOsjqMmPNcQmJmAINifxYXW6YkFhZn9NByhhwWPmLFg=","AlnO3d624EjmxRn07BCadnwd5S2I9tV38KB9GXPGMyA=","LERlPBzQ1h9W0n7zDo58bd/k8tTF9fE6BmGFKx0vMGM=","Yhf1CnArcBN9Ho2T7Kw+SO67VoH7hK8OHrWEHeTpKyw=","JDd5Cu6G3uLlZsGdOeqST2JLLmx0U5z7V6AEDu7TeTc=","wOj6M1gq541TxzTzLl+cMHBfBz2al4E0v0Y0jTOozRA=","bjcFiq8brQrflQ4nITsgI20BerirazxkqHhrNGRN934=","VP6M4zWhpB06wvBQjDBzgzJrURHRLHuyQXrtbEezgDs=","jsrF7Q8U9YPoWs3aV/wO2mz/cpVHMQt/PPZllGodHwM=","AKGs4uVT2k4XocD+9afsNdqr2KONdXi4iHoyZDTuSFE=","mGRY3cILOu3M8C/bTLT1wKyEiSPVNWQDTUIXJwPCsUs=","Rh4mW7T8Po30TbkxVqXnK1+I/xi5VPEsk+G2jKjOxF8=","0nzJ77CROoy2tydOjprhk+u9CFH6fUOU/ST0NW2Bxg8=","PAFI6LnomQma/vWUcjCfr3lJNofBxNpJXxTEzQ/PuyU=","UpMoYs90b6M1wrxsFRuZ1lzmDIJ1l7fBORN9+lL0ugk=","eiAE8LPq+ebtV5ZDAz6rH7xFXHvDGBi/5sSK+LobIyQ=","9Pit8LHmbWcypH4/COkjdErYzY30Rt/QtQPh1YWMr0c=","3NrIiS6b0c77TsJ10+Whkwi0XYG4mDb/EYGH+wByXhk=","FmkTFqrzUbFzBeDCJWtZAREL08XA6NHMUdabcjiTRTM=","RFU8xCExh9xzhR8mQppV0rEG04WtvFYwhD+rcCo2gHc="]}
                   Content Type: application/json
                   Method: kPost

@btlechowski btlechowski added OS/Android Fixes related to Android browser functionality QA Pass - Android Tab labels Feb 7, 2023
@tmancey tmancey added this to Ads Jun 10, 2024
@tmancey tmancey moved this to Done in Ads Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature/ads OS/Android Fixes related to Android browser functionality OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass - Android Tab QA Pass-Linux QA/Yes release-notes/exclude
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants