Skip to content

Commit

Permalink
delthas#41 delthas#45 Solved problem with error Check your credentials.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiodepin committed Jan 31, 2018
1 parent d2f505e commit c3d3cd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/fr/delthas/skype/WebConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private User updateUser(JSONObject userJSON, boolean newContactType) throws Pars
String userAvatarUrl = null;
try {
if (!newContactType) {
userUsername = userJSON.getString("username");
userUsername = userJSON.optString("username");
userFirstName = userJSON.optString("firstname", null);
userLastName = userJSON.optString("lastname", null);
userMood = userJSON.optString("mood", null);
Expand Down Expand Up @@ -220,6 +220,7 @@ private Response sendRequest(Method method, String apiPath, boolean absoluteApiP
logger.finest("Sending " + method + " request at " + url);
if (skypeToken != null) {
conn.header("X-Skypetoken", skypeToken);
conn.header("Accept", "application/json");
} else {
logger.fine("No token sent for the request at: " + url);
}
Expand Down

0 comments on commit c3d3cd2

Please sign in to comment.