Skip to content

Commit ddf90e8

Browse files
committed
fix bug #162
1 parent 7d1f57b commit ddf90e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/FikaAmazonAPI/Services/TokenGeneration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static async Task<TokenResponse> RefreshAccessTokenAsync(AmazonCredential
3838
return accessToken;
3939
}
4040

41-
public static async Task<TokenResponse> GetAccessTokenFromCodeAsync(string ClientId, string ClientSecret, string code, string appRedirectUri)
41+
public static async Task<TokenResponse> GetAccessTokenFromCodeAsync(string ClientId, string ClientSecret, string code, string appRedirectUri, string grant_type = "client_credentials")
4242
{
4343
string data = string.Empty;
4444

@@ -49,7 +49,7 @@ public static async Task<TokenResponse> GetAccessTokenFromCodeAsync(string Clien
4949
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
5050

5151
Dictionary<string, string> items = new Dictionary<string, string>();
52-
items.Add("grant_type", "client_credentials");
52+
items.Add("grant_type", grant_type);
5353
items.Add("scope", ScopeConstants.ScopeMigrationAPI);
5454
items.Add("client_id", ClientId);
5555
items.Add("client_secret", ClientSecret);

0 commit comments

Comments
 (0)