Bonjour a tous,
Alors voila j'essaie actuellement d'utiliser l'API de mon école et ai beaucoup de mal a comprendre certaine chose
Tout d'abord dans mon application Android j'utilise une WebView pour envoyer mon utilisateur sur la page d'Authorization (je ne sais pas si il faut faire ça), déja ça je n'y arrive pas, si je suis leur documentation il faut que j'utilise ceci :
Base url
GET https://api.intra.42.fr/oauth/authorize
Parameters
Name Type Description
client_id string Required. The client ID you received from 42 when you registered.
redirect_uri string The URL in your app where users will be sent after authorization. See details below about redirect urls.
scope string A space separated list of scopes. If not provided, scope defaults to an empty list of scopes for users that don't have a valid token for the app. For users who do already have a valid token for the app, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the same scopes that were used last time the user completed the flow.
state string An unguessable random string. It is used to protect against cross-site request forgery attacks.
response_type string The response type. Ususally code.
donc je fait
en fait, je sais pas comment obtenir l'authorization, je suppose qu'avec cette authorization j'botient le token ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 WebView myWebView = (WebView) findViewById(R.id.webview); assert myWebView != null; myWebView.loadUrl(url);
est-ce qu'on pourrai me mettre sur la voie ?
Partager