'404 response when requesting current user via post request(Oauth2)

I'm trying to find out more info about the user and have looked at the docs which has helped some but i'm stuck since i keep getting back a 404 response when i request my the data. I've tried flipping the headers2 var with the data1 var as well but the same response.https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-users (here's the documentation i'm using)

def info(token):
    data1 = {'Authorization':token}
    headers1 = {'Content-Type': 'application/x-www-form-urlencoded',"Authorization": "Bearer"}
    r = requests.post("https://api.coinbase.com/v2/user/", data=data1, headers=headers1)
    print(r)


Solution 1:[1]

The request should be a get and not a post. The token goes in the Authorization header using the format Bearer [token]

 def info(token):
    headers1 = {
        "Content-Type": 'application/x-www-form-urlencoded',
        "Authorization": f"Bearer {token}"}
    r = requests.get("https://api.coinbase.com/v2/user/", headers=headers1)
    print(r)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Juan Cruz Borssotto