/// <summary> /// Request Access Token Partner makes a request to the token endpoint by adding the following parameters described below /// </summary> /// <exception cref="MeliLibTools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="grantType">Value MUST be set to \"authorization_code\"</param> /// <param name="clientId"></param> /// <param name="clientSecret"></param> /// <param name="redirectUri"></param> /// <param name="code">The code received in the query string when redirected from authorization page (optional)</param> /// <param name="refreshToken">The refresh_token received in the query string when redirected from authorization page (optional)</param> /// <returns>Task of Token</returns> public async System.Threading.Tasks.Task <Token> GetTokenAsync(string grantType, string clientId, string clientSecret, string redirectUri, string code = default(string), string refreshToken = default(string)) { MeliLibTools.Client.ApiResponse <Token> localVarResponse = await GetTokenAsyncWithHttpInfo(grantType, clientId, clientSecret, redirectUri, code, refreshToken); return(localVarResponse.Data); }
/// <summary> /// Request Access Token Partner makes a request to the token endpoint by adding the following parameters described below /// </summary> /// <exception cref="MeliLibTools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="grantType">Value MUST be set to \"authorization_code\"</param> /// <param name="clientId"></param> /// <param name="clientSecret"></param> /// <param name="redirectUri"></param> /// <param name="code">The code received in the query string when redirected from authorization page (optional)</param> /// <param name="refreshToken">The refresh_token received in the query string when redirected from authorization page (optional)</param> /// <returns>Token</returns> public Token GetToken(string grantType, string clientId, string clientSecret, string redirectUri, string code = default(string), string refreshToken = default(string)) { MeliLibTools.Client.ApiResponse <Token> localVarResponse = GetTokenWithHttpInfo(grantType, clientId, clientSecret, redirectUri, code, refreshToken); return(localVarResponse.Data); }