You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I have been able to obtain the OAuth2 access token (and its accompanying refresh token) on the staging environment and also perform scrobble API calls from my Android mobile app to that env successfully, I have been unable to revoke said token, no matter what I try (I know that O2Auth token revocation is not strictly necessary for the Trakt API, but I do want to give the user of the app the option to end the session.)
At this point, I have a few questions, please:
For the OAuth2 auth code flow, I am using the AppAuth-Android library. I would think that the revoke call can be performed via any regular HTTP library, but perhaps am I also supposed to use an OAuth2 library like AppAuth-Android for this?
Here's the request I am making from the Android mobile app via the same HTTP library I use for the (successful) scrobble operations, but formatted as if it were a cURL request (note that I have tried either https://staging.trakt.tv or https://api-staging.trakt.tv for <host>, with the same result described below):
This request (and many other variations) always returns the 200 status code, but the Connected Apps section on the Trakt website still shows the access token.
Any help will be appreciated.
The text was updated successfully, but these errors were encountered:
Just to report that this is working for me now, with no code change on my side, right after I reported my problem here. Perhaps I was doing something wrong during my tests. Thanks anyway!
For anyone interested, I will reply to my own questions above:
Any regular HTTP library should work for this.
It looks like the api host is used for OAuth2 token revocation (e.g., https://api-staging.trakt.tv for the staging environment.)
While I have been able to obtain the OAuth2 access token (and its accompanying refresh token) on the
staging
environment and also perform scrobble API calls from my Android mobile app to that env successfully, I have been unable to revoke said token, no matter what I try (I know that O2Auth token revocation is not strictly necessary for the Trakt API, but I do want to give the user of the app the option to end the session.)At this point, I have a few questions, please:
AppAuth-Android
library. I would think that therevoke
call can be performed via any regular HTTP library, but perhaps am I also supposed to use an OAuth2 library likeAppAuth-Android
for this?oauth/authorize
), the docs (https://trakt.docs.apiary.io/#reference/authentication-oauth/authorize/authorize-application) indicate that the client should use thehttps://(staging.)trakt.tv
host instead of theapi
host used for non-auth requests. Does this apply to theoauth/revoke
endpoint, too? (I don't think it does.)Here's the request I am making from the Android mobile app via the same HTTP library I use for the (successful) scrobble operations, but formatted as if it were a cURL request (note that I have tried either
https://staging.trakt.tv
orhttps://api-staging.trakt.tv
for<host>
, with the same result described below):This request (and many other variations) always returns the
200
status code, but the Connected Apps section on the Trakt website still shows the access token.Any help will be appreciated.
The text was updated successfully, but these errors were encountered: