Question Details

Answered
Getting user not found for the user profile API

Hi,

I am getting response code as 404 i.e. not found for a userId which is valid for the below mentioned API. api to fetch user profile : https://api.line.me/v2/bot/profile/{userId}

Please check and revert soon.

0
Profile picture
Akanksha

Answers

3
Profile picture
Henry Wu 吳冠霆
Posted: 1 years ago

Make sure the {userId} is the ID that returned from a webhook event object. Do not use the LINE ID found on LINE. The {userId} is a string that matches the regular expression, U[0-9a-f]{32}

Profile picture
Caller Tech
Posted: 1 years ago

https://api.line.me/v2/bot/profile/{userId

Profile picture
Gildas
Posted: 1 years ago

Also the UserId you get from LINE is unique to your LINE Channel Id. Which means if you collected the UserId with another LINE Channel Id, you won't be able to use it with this Channel Id.

I think this is done to avoid people/companies that would sell list of "customers" to marketers, etc.

Are you sure? question.vm