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

How to use PushMessage with event.Source.UserID #32

Closed
appleboy opened this issue Nov 13, 2016 · 9 comments
Closed

How to use PushMessage with event.Source.UserID #32

appleboy opened this issue Nov 13, 2016 · 9 comments

Comments

@appleboy
Copy link
Contributor

Hi,

I can get the event.Source.UserID from this example but got the following message using PushMessage func.

if _, err = bot.PushMessage(event.Source.UserID, linebot.NewTextMessage(message.Text)).Do(); err != nil {
  log.Print(err)
}

Error Message: linebot: APIError 403 Access to this API is not available for your account

Any thoughts about this issue? Thanks.

@sonatard
Copy link

👍

@appleboy
Copy link
Contributor Author

I see what is different account type from LINE official account and LINE@ account so we need to submit a partnership proposal for a LINE official account with the Business Connect feature.

The default Usable APIs just only REPLY_MESSAGE.

screen shot 2016-11-14 at 9 23 58 am

@sonatard
Copy link

Developer Trial plan is free access for push message API. But I have no idea to change role to Developer Trial.

@appleboy
Copy link
Contributor Author

@sona-tar How could I change account to Developer Trial plan?

@GuitarSucks
Copy link
Contributor

@appleboy
Which country are you based on?
The plans are different per country also

@appleboy
Copy link
Contributor Author

@GuitarSucks Taiwan.

@appleboy
Copy link
Contributor Author

@GuitarSucks I write the drone-line plugin to send build status to user. The new line api version is limited. It is working for previous api version.

@GuitarSucks
Copy link
Contributor

OK
For Developer Trial you cant use the current account. You need to create a new account with Developer Trial.
If you are thinking to make a service you can use PRO plan for push message.
Please check plans here
https://business.line.me/en/services/bot

@appleboy
Copy link
Contributor Author

@GuitarSucks It is working now. I delete my previous account and create new trial account.

screen shot 2016-11-14 at 10 25 49 am

Tip: you must click "Start using Developer Trial" not right button as below.

screen shot 2016-11-14 at 10 27 05 am

Thanks @sona-tar and @GuitarSucks

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

3 participants