## Here is another way without having to use the Battle.net App
1. Retrieve SSO Token:
2. Get Bearer Token:
-
Replace <SSO_TOKEN> with the token you got from step 1 and execute the following curl command to obtain the Bearer Token:
curl -X 'POST' \
'https://oauth.battle.net/oauth/sso' \
-H "content-type: application/x-www-form-urlencoded; charset=utf-8" \
-d "client_id=baedda12fe054e4abdfc3ad7bdea970a&grant_type=client_sso&scope=auth.authenticator&token=<SSO_TOKEN>"
- Response:
{"access_token":"XXX","token_type":"bearer","expires_in":0,"scope":"auth.authenticator","sub":"XXX"}
-
Copy the Bearer Token to use in steps 3, 4. or 5.
3. Get Serial & Restore Codes:
4. Get Existing Authenticator Device Secret:
5. Create and Add a New Authenticator:
6. Add Authenticator to Password Manager.
-
After you have obtianed the deviceSecret convert it from hex to base32 using echo "deviceSecret" | xxd -r -p | base32 on Linux/macOS or cryptii.com if on Windows
-
Replace deviceSecret in the following URL: otpauth://totp/Battle.net?secret=deviceSecret&digits=8 with the newly obtained base32 device secret, and you should have a working TOTP.
Originally posted by @BillyCurtis in #38 (comment)
1. Retrieve SSO Token:
EU-84902f44j57m687039586j7egdfa0a54-11657396902. Get Bearer Token:
Replace
<SSO_TOKEN>with the token you got from step 1 and execute the following curl command to obtain the Bearer Token:{"access_token":"XXX","token_type":"bearer","expires_in":0,"scope":"auth.authenticator","sub":"XXX"}Copy the Bearer Token to use in steps 3, 4. or 5.
3. Get Serial & Restore Codes:
Use the Bearer Token to fetch the Serial and Restore Codes of an existing authenticator:
{"Restore Code": "XXX", "Serial Number": "XXX"}4. Get Existing Authenticator Device Secret:
Use the Bearer Token, Serial, and Restore codes to retrieve the Device Secret of an Existing Authenticator:
{"serial":"XXX","restoreCode":"XXX","deviceSecret":"XXX","timeMs":0,"requireHealup":false}5. Create and Add a New Authenticator:
Use the Bearer Token to create and add a new authenticator to the users account :
{"serial":"XXX","restoreCode":"XXX","deviceSecret":"XXX","timeMs":0,"requireHealup":false}6. Add Authenticator to Password Manager.
After you have obtianed the
deviceSecretconvert it from hex to base32 usingecho "deviceSecret" | xxd -r -p | base32on Linux/macOS or cryptii.com if on WindowsReplace
deviceSecretin the following URL:otpauth://totp/Battle.net?secret=deviceSecret&digits=8with the newly obtained base32 device secret, and you should have a working TOTP.Originally posted by @BillyCurtis in #38 (comment)