Open nicooga opened 9 years ago
Me too got same bug. any update?
The same to mine, others work well but #send_message
@codeboxanvo I used linkedin rest API it works for me. There is problem in this gem for sending message. Here is my code Used HTTParty Gem to send message
data = {subject: 'subject', body: 'body', recipients: {values: [uid].map{|profile_path| {person: {_path: "/people/#{profile_path}"}} } }}
HTTParty.post("https://api.linkedin.com/v1/people/~/mailbox", headers: { 'Content-Type' => 'application/json'}, query: {oauth2_access_token: 'xxxxxxxxxxxxxxx'}, body: data.to_json)
From latest code, it seems the same data format with linkedin documents https://github.com/emorikawa/linkedin-oauth2/blob/master/lib/linked_in/communications.rb https://developer.linkedin.com/documents/messaging-between-connections-api
@codeboxanvo yes same format but some data is missing in request. tats y it return 400.
You can look the error status.
https://developer.linkedin.com/documents/error-codes
Just in case, yes I have configured the gem with my app_id, app_secret, and I'm getting user tokens through the oauth2 login process using omniauth. Other endpoints, like
#connections
are working fine and returning data, but not#send_message
.Is possible
#send_message
is outdated? Can I put Faraday on verbose mode so I can debug this?