![]() NOTE An application must request only the scopes required by the APIs that their app calls. You must URL encode the list for example, &scope=user%3Aedit%20user%3Aread%3Aemail. When you send an HTTP GET request to, you set the scope query parameter to the list of scopes required to support your app’s functionality. The authorization gives your app permission to perform the specified action on the user’s behalf. For APIs that require a user access token, the API reference content identifies the scopes that the user must authorize. For example, some APIs require a user access token and others require an app access token. I am using the user:read:follows which will allow me to view the list of channels a user follows.Each API that your app calls specifies the type of token it requires. just simply replace $clientId and $redirectUri with the values unique to your application.$clientId&redirect_uri=$redirectUri&response_type=token&scope=user:read:follows ultimately the request end point will look like this: according to the documentation we need to make a request to and provide it with parameters of Client_it, redirect_uri, response_type and scope.we need to implement the implicit grant flow Now that we know what token we are using and have an intent filter set up.If that happens it means your intent filter is not properly implemented You can tell if you messed up the intent filter if upon a successful login, the user is not directed back to your application, but instead tries to load the redirect uri in the browser. The Android OS will send out an Implicit Intent looking for any applications that can handle an intent with the redirect URI of Well once our user logs into Twitch through the browser(we do this so our application does not know the user's username or password. Notice how the host and scheme are the exact same as the redirect URI.For this particular redirect URI the proper intent filter is:Įnter fullscreen mode Exit fullscreen mode In order for us to utilize this OAuth Redirect URI properly we must use the proper intent-filter.However, it is common practice to use com.yourappname(what your application's name it) The peanutbutterjelly part is purely up to you, as there is no restrictions. You might of noticed that I have used as the redirect URI, but why? The only restrictive part of this URI is the https, as Twitch will not allow any other type of protocol.If you are unfamiliar with the flow of an OAuth mobile application, then I would like to point you to on of my previous tutorials, found HERE. ![]() If you have never heard of OAuth before, I recommend you watch this video, HERE, just make sure to watch it in 2x speed. The section I want to draw your attention to is the OAuth Redirect URIs. Now the name can be whatever you want, it just has to be unique within the Twitch developer ecosystem
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |