Get contact image
#
Method#
/profile-pictureGET
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/profile-picture
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
ConceptThis method is responsible for returning a url with your contacts picture updated.
As already stated in the previous topic please Remember
If you intend to store your contact's image, please note that we always return in get-contacts the attribute with imgUrl with it for you, but it is important to remember that it is only available for 48 hours, after this period the image link is deleted by WhatsApp itself . We suggest that if you need to update your contact's image, you use the next method in this documentation, get-profile-picture.
#
Attributes#
RequiredAttributes | Type | Description |
---|---|---|
phone | string | telephone number in the format DDI DDD NUMERS Ex: 551199999999. IMPORTANT only send numbers without formatting or a mask |
#
OpcionaisAttributes | Type | Description |
---|---|---|
#
Request Params#
URL exampleMethod
GET
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/profile-picture?phone=551199999999
#
Response#
200Attributes | Type | Description |
---|---|---|
link | string | Url with the contact’s picture |
Example
#
405In this case certify that you are sending the correct specification of the method. This means, verify if you sent a POST or GET as specified at the beginning of this topic.
#
415In case you receive 415 error, make sure to add the “Content-Type” of the object you are sending in the request headers, mostly “application/json”