android retrofit response not equal to postman response

Clash Royale CLAN TAG#URR8PPPandroid retrofit response not equal to postman response
hello guys i trying to reach data in instagram webService but in postman i get this response
{
"access_token":"1642576492.8d98317.2072b80503d14218bc5fcdbb26982d95",
"user":{
"id":"1642576492",
"username":"hesamilyaei",
"profile_picture":"https://scontent.cdninstagram.com/vp/69b6c110a166eb415ff1a10b8dbe9fe3/5C0B0872/t51.2885-19/s150x150/17818811_292597561174489_2362514411194679296_a.jpg",
"full_name":"hesam ilyaei",
"bio":"ud83dudcbbAndroid u2699ufe0fDevelopernIn u2764nu062fu0644 u0631u0627 u0633u0631u0650 u0634u0648u0642u06cc...n u0627u06afu0631u0645 u0647u0633u062a...n u062au064fu0648 u0622u0646u06cc...!",
"website":"",
"is_business":false
}
}
but in retrofit response i get this br html tag when i log response.body
when i call service with Model class it gives me this error:
Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
when i call service with String call back it shows me br tag in response body
this is my model class:
public class ViewModelInstaData implements Serializable {
@SerializedName("access_token")
@Expose
private String accessToken;
@SerializedName("user")
@Expose
private ViewModelInstaDataUser user;
private final static long serialVersionUID = 1692990614104533394L;
/**
* No args constructor for use in serialization
*
*/
public ViewModelInstaData() {
}
/**
*
* @param accessToken
* @param user
*/
public ViewModelInstaData(String accessToken, ViewModelInstaDataUser user) {
super();
this.accessToken = accessToken;
this.user = user;
}
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
public ViewModelInstaDataUser getUser() {
return user;
}
public void setUser(ViewModelInstaDataUser user) {
this.user = user;
}
}
public class ViewModelInstaDataUser implements Serializable {
@SerializedName("id")
@Expose
private String id;
@SerializedName("username")
@Expose
private String username;
@SerializedName("profile_picture")
@Expose
private String profilePicture;
@SerializedName("full_name")
@Expose
private String fullName;
@SerializedName("bio")
@Expose
private String bio;
@SerializedName("website")
@Expose
private String website;
@SerializedName("is_business")
@Expose
private Boolean isBusiness;
private final static long serialVersionUID = 2434734929798479023L;
/**
* No args constructor for use in serialization
*
*/
public ViewModelInstaDataUser() {
}
/**
*
* @param id
* @param username
* @param bio
* @param website
* @param profilePicture
* @param fullName
* @param isBusiness
*/
public ViewModelInstaDataUser(String id, String username, String profilePicture, String fullName, String bio, String website, Boolean isBusiness) {
super();
this.id = id;
this.username = username;
this.profilePicture = profilePicture;
this.fullName = fullName;
this.bio = bio;
this.website = website;
this.isBusiness = isBusiness;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getProfilePicture() {
return profilePicture;
}
public void setProfilePicture(String profilePicture) {
this.profilePicture = profilePicture;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public String getBio() {
return bio;
}
public void setBio(String bio) {
this.bio = bio;
}
public String getWebsite() {
return website;
}
public void setWebsite(String website) {
this.website = website;
}
public Boolean getIsBusiness() {
return isBusiness;
}
public void setIsBusiness(Boolean isBusiness) {
this.isBusiness = isBusiness;
}
}
and this is my retrofit call
ApiInterface apiInterface = Api.getClient().create(ApiInterface.class);
Call<ViewModelInstaData> call = apiInterface.getAccountData(url);
call.enqueue(new Callback<ViewModelInstaData>() {
@Override
public void onResponse(@NonNull Call<ViewModelInstaData> call, @NonNull Response<ViewModelInstaData> response) {
Log.i("AccountResponse", String.valueOf(response.code()));
if (response.code() == 200) {
Log.i("token",response.body().getAccessToken());
} else {
}
}
@Override
public void onFailure(@NonNull Call<ViewModelInstaData> call, @NonNull Throwable t) {
loginPresenterInterface.onFailedAccountData(1000, t.getMessage());
Log.i("AccountFailed", String.valueOf("Failed"));
Log.i("AccountFailed", String.valueOf(t.getMessage()));
}
});
and this is my retrofit interface
@GET("{url}")
Call<ViewModelInstaData>getAccountData(@Path("url") String url);
@MRah yes just a sec
– Hesam Ilyaei
7 mins ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Can you post your class and retrofit code?
– MRah
10 mins ago