requests / requests-oauthlib

OAuthlib support for Python-Requests!
https://requests-oauthlib.readthedocs.org/
ISC License
1.71k stars 422 forks source link

Signature does not match with Garmin #432

Open yass-arafat opened 3 years ago

yass-arafat commented 3 years ago

Hello It seems that with the same credentials Garmin signature and this library's signature is not same as a result i am getting "Invalid Oauth signature" error from Garmin. They are using OAuth1 and i also tried OAuth1 of this library.

    client_key = "18fdbc0b-0e33-4f02-bac8-e3bc3f53234d"
    client_secret = "jD4QwYRhdvtxtZr9yKSDkfr1krT01i7mH22"
    resource_owner_secret = "rYdd5WQU49sc1f0bryX2YA5B52u16D1Vydv"
    callback_url="https://apis.garmin.com/training-api/workout/"

    garmin = OAuth1Session(client_key=client_key,
                           client_secret=client_secret,
                           resource_owner_key="3d2e4fad-a31b-48e8-ad6a-35ade93a9855",
                           resource_owner_secret=resource_owner_secret)
    response = garmin.post(url=callback_url, data=request.data)

I have hardcoded nonce=4NH0QkD4spw and timestamp=1607308412 in your library same as below screenshot but it seems library is giving signature RnAhuWRQluW6IMVv3YcbkigIJ90= where garmin is providing signature 0HzWjLTJsDxsvr1iUxXB/vvotZ4=

This is from Garmin tool image image

Any help on this?