How do I get access token?

Support
  • Please help how to POST like follow code in BAS (It''s ok in python):
    import requests
    email = "treezyjeckaz@hotmail.com"
    password = "DgNroVonz"
    refresh_token = "M.C517_BAY.0.U.-Ck!oX!QQd2TnqfUx5OetxvV2sfH3xt5nf50V!fYtWY0u0GXv0KxPZNMbEy22eJGBvgabrFaAIFtaTs82Q5yCctOqVR63hSR5AIB9PSqa9AxfIJ0DirIZ3L4ckH6aw3aLmFY4p9JSdr7CgJ8AsVWHwYF6KKq6zoWNwtywdzhOLyWQrpKZ!1rAz2rz2GAUINiMnHlK9vu967CeIMWRH7wSg3P!lNiee4Pgor5n1eC9SBL6WvVQaZJ6IeCRnjWoXzftR2pW!XoGu6QEF57H0J1KGSGbAAOVrDz3SLjrogjLOKYQt3ZL2nKD8MRpG7JB1e6yrxLb!q76mi62Fd4L9zlWkOJtruA6xtFh2OpEfeO!Q0aXDO8RXSKUalC*cpivFcd1aA!254YXU4XjMhM10lqOFsY4y725uGzH1WDQcnXjbPeY8j29FOj8MKbSTGng$$"
    client_id = "8b4ba9dd-3ea5-4e5f-86f1-ddba2230dcf2"

    token_url = "https://login.microsoftonline.com/common/oauth2/v2.0/token"
    token_data = {
    "grant_type": "refresh_token",
    "refresh_token": refresh_token,
    "client_id": client_id,
    "scope": "https://graph.microsoft.com/.default"
    }
    headers = {
    "Content-Type": "application/x-www-form-urlencoded" # Changed to x-www-form-urlencoded for this type of request
    }
    token_response = requests.post(token_url, data=token_data, headers=headers)

    if token_response.status_code == 200:
    access_token = token_response.json().get("access_token")
    print("Access Token:", access_token)

  • Cant access localstorage

    Support
    0 Votes
    13 Posts
    959 Views
  • 0 Votes
    2 Posts
    599 Views
  • 0 Votes
    3 Posts
    640 Views
  • 0 Votes
    2 Posts
    969 Views
  • 0 Votes
    1 Posts
    1117 Views