Software Alternatives & Reviews

Using OAuth2.0 and Retrofit to talk to the GitHub api on Android

Retrofit GitHub GitHub OAuth
  1. Retrofit is a type-safe HTTP client for Android and Java.
    Pricing:
    • Open Source
    This particular blog post will be us building on the information from the previous blog post and using the authorization code from the GitHub OAuth API in combination with Retrofit. To finally get a access token, which allows us to make requests to the API on a behalf of a user.

    #Development Tools #Javascript UI Libraries #JavaScript Framework 28 social mentions

  2. 2
    Originally founded as a project to simplify sharing code, GitHub has grown into an application used by over a million people to store over two million code repositories, making GitHub the largest code host in the world.
    Pricing:
    • Open Source
    Object RetrofitInstance { private val retrofits by lazy{ Retrofit.Builder() .baseUrl("https://github.com/") .addConverterFactory(GsonConverterFactory.create()) .build() } val api:GitHubClient by lazy { retrofits.create(GitHubClient::class.java) } }.

    #Code Collaboration #Git #Version Control 2038 social mentions

  3. OAuth is a protocol that lets external applications request authorization to private details in a user's GitHub account.
    The first thing that we need to do is to read Github's documentation and find the endpoint we need to make a request to. Per the documentation, we find out that the endpoint is a POST request to https://github.com/login/oauth/access_token. We also find out that the post request takes in 3 input parameters. client_id,client_secret and code. All of which we got from my previous tutorial.

    #Monitoring Tools #Remote Monitoring And Management #Patch Management 4 social mentions

Discuss: Using OAuth2.0 and Retrofit to talk to the GitHub api on Android

Log in or Post with