Change Avatar from API


#1

ents.js:208:7) at TLSSocket._finishInit (_tls_wrap.js:639:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:469:38) code: ‘UNABLE_TO_VERIFY_LEAF_SIGNATURE’ }

e[34mI20181129-11:15:38.831(-2) Error while handling the setting of the avatar from a url (https://portal.drugovich.com.br/files/funcionarios/avatar/avatar_12611.jpg) for admin: { Error: unable to verify the first certificate at TLSSocket.<anonymous> (_tls_wrap.js:1105:38) at emitNone (events.js:106:13) at TLSSocket.emit (events.js:208:7) at TLSSocket._finishInit (_tls_wrap.js:639:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:469:38) code: ‘UNABLE_TO_VERIFY_LEAF_SIGNATURE’ }

How fix this?


#2

It looks like you’re having issues with SSL?


#3

@rafael.kellermann Yes! But i have SSL install on rocket chat and my client (php), both are Comodo SSL Wildcard on my intranet


#4

How are you trying to update the avatar?


#5

Yes! i want set a new avatar image from a URL to my users…

I’m online on https://open.rocket.chat if it’s better to talk…


#6

It’s better to do it over here, this way other users are going to see the responses. What’s the request you are trying to do?


#7

Ok. I have try this way
curl -H “X-Auth-Token: (private)”
-H “X-User-Id: (private)”
-H “Content-type:application/json”
-d ‘{“avatarUrl”: “https://portal.drugovich.com.br/files/funcionarios/avatar/avatar_12611.jpg”}’
https://mid.drugovich.com.br/api/v1/users.setAvatar


#8

Looks like your image URL is not valid. I can’t open it, and the API have something wrong as well that I’ll be reported. :+1:


#9

The URL is Valid, but only in my network. It’s a Intranet App with a SSL from Comodo.


#10

I see, that makes sense. The API is giving me Bad Gateway here, I’m sending the information to the team responsible.


#11

Ok. Thanks @rafael.kellermann i waiting


#12

You can follow this issue: https://github.com/RocketChat/Rocket.Chat/issues/12787.


#13

Thanks!
But https://portal.drugovich.com.br/files/funcionarios/avatar/avatar_12611.jpg is not working outside of my network. So i think is better change on github issue this url