Can not login

83 views
Skip to first unread message

Александр Остробородов

unread,
Sep 4, 2021, 5:12:09 PM9/4/21
to Feedly Cloud
auth = {'client_id': 'Your user id is', 'client_secret': 'Your access token'}
data = {'grant_type': 'client_credentials'}
headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36'}
access_token_response = requests.post(token_url, data=data, headers=headers, auth=('client_id', 'client_secret'))
print(access_token_response.text)

{"errorCode":401,"errorId":"ap5int-sv2.2021090414.605815","errorMessage":"must provide authorization token"}

David Chatenay

unread,
Sep 6, 2021, 3:10:01 AM9/6/21
to Александр Остробородов, Feedly Cloud
  Hi,
  This doesn't look right. The token URL is `https://cloud.feedly.com/v3/auth/token` not `/v3/profile`. It is used to exchange a code (from the web auth flow) or to generate new access tokens from a refresh token. Also the `auth` parameters are all wrong.
  The fastest way to get started is to generate a developer token. If you have a Feedly Pro subscription, they can be renewed after they expire.
  I hope this helps.

-- 
David Chatenay
Platform Engineer
Feedly


--
You received this message because you are subscribed to the Google Groups "Feedly Cloud" group.
To unsubscribe from this group and stop receiving emails from it, send an email to feedly-cloud...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/feedly-cloud/3ff1c164-56bc-49d3-b304-a1fa2ee46f62n%40googlegroups.com.

Александр Остробородов

unread,
Sep 6, 2021, 12:02:30 PM9/6/21
to Feedly Cloud
client_id = "XXX"
client_secret = "XXX"

data = {
"Content-Type":"application/x-www-form-urlencoded  ",
"grant_type": "authorization_code",
"code": "authorization_code",
"client_id": "client_id",
"client_secret": "client_secret",
}

access_token_response = requests.post(token_url, data=data, allow_redirects=False)

print(access_token_response.text)
------
{"errorCode":400,"errorId":"ap7int-sv2.2021090608.3551379","errorMessage":"missing redirect_uri"}


What i did wrong ?

понедельник, 6 сентября 2021 г. в 10:10:01 UTC+3, david:

David Chatenay

unread,
Sep 6, 2021, 2:14:26 PM9/6/21
to Александр Остробородов, Feedly Cloud
  This doesn't look right either.
  The `code` value is returned by the OAuth flow, as described here (this requires opening the `/v3/auth/auth` URL with the appropriate parameters in a browser window).
  This `/v3/auth/token` call requires you to provide the same `redirect_uri` value that you passed in the initial request to `/v3/auth/auth`.
  The value `Content-Type: application/x-www-form-urlencoded` needs to be passed as a header in the HTTP request, not as a form value.
  Last, this API assumes you have a client_id and client_secret. Beware: the sandbox key only works on the sandbox platform, not in production.
  I hope this helps.

-- 
David Chatenay
Platform Engineer
Feedly

Reply all
Reply to author
Forward
0 new messages