Error updating APIGEE objects

I am currently developing an application that implements apigee, however I encountered a problem while trying to update entities. Below is the method I'm using now.

Map<String, Object> updatedEntity = new HashMap<String, Object>(); ArrayList<Map<String,Object>> subPropertyArray = new ArrayList<Map<String,Object>>(); Map<String, Object> subProperty = new HashMap<String, Object>(); subProperty.put("age", ""); subProperty.put("auto_checkin_times", auto_checkin_times); subProperty.put("auto_checkins_enabled", "on"); subProperty.put("bio", ""); subProperty.put("max_age", "999"); subProperty.put("min_age","18"); subProperty.put("dob", mDob); subProperty.put("locale",""); subProperty.put("sex", mGender); subProperty.put("sexual_preference", mSexualPreference); subProperty.put("utc_offset",""); subPropertyArray.add(subProperty); updatedEntity.put("type", "user"); updatedEntity.put("info", subPropertyArray); dataClient.updateEntityAsync(entityID, updatedEntity, new ApiResponseCallback() { @Override public void onResponse(ApiResponse apiResponse) { if (apiResponse != null) { Intent intent = new Intent(SetupPage.this, HomePage.class); startActivity(intent); } } @Override public void onException(Exception e) { Log.e("", e.toString()); } }); 

However, I get the following error:

"PUT error before ' https://api.usergrid.com/ ORGNAME / APPNAME / user / USERID"

and then:

"No Authentication Issues Found"

"doHttpRequest returned null"

Any help would be greatly appreciated. thanks

+5
source share
2 answers

I had to answer, I received it earlier, but the problem seemed to come down to a number of problems, the essence was a little wrong, and the data that I sent was not formatted correctly.

0
source

Are you sending a token with a request? The "No authentication problems" errors make me think that you can either pass the token to an endpoint that does not require it (for example, the default application for the sandbox), or pass an invalid token with the request.

0
source

Source: https://habr.com/ru/post/1200732/


All Articles