Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 error when i was calling message.create method . #98

Closed
medaamarnadh opened this issue Jul 6, 2016 · 4 comments
Closed

404 error when i was calling message.create method . #98

medaamarnadh opened this issue Jul 6, 2016 · 4 comments

Comments

@medaamarnadh
Copy link

medaamarnadh commented Jul 6, 2016

Hi , I was getting below error when i was calling messages.create method .

Can any one explore this

"body": { "type": "error.list", "request_id": "alnvbrgmmvv77ttsm17g", "errors": [ { "code": "not_found", "message": "Resource Not Found" } ] },

@bobjflong
Copy link
Contributor

This mostly likely indicates that the user or admin you are referencing in the API call does not exist. Both must exist prior to sending the message. Can you confirm that? If still a problem can you provide more details about the call you are making?

@laurensnl
Copy link

laurensnl commented Jul 27, 2016

Same problem here.

var message = {
    from: {
        type: "user",
        id: "facebook:10155957623850603"
    },
    body: "Howdy this is a test"
};

intercomClient.messages.create(message, function(data) { console.log(data.status); });

Writes '404' to the console. Any suggestions?

@laurensnl
Copy link

laurensnl commented Jul 27, 2016

Found the solution.

id must be user_id

var message = {
    from: {
        type: "user",
        user_id: "facebook:10155957623850603"
    },
    body: "Howdy this is a test"
};

@mhassanpur
Copy link

@laurensnl That worked! I guess the Intercom API docs need to be updated: https://developers.intercom.com/reference#user-or-contact-initiated-conversation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants