The User Endpoint
Last updated: March 31, 2020
This is the endpoint that your application will use to get Meveto ID of a user that has triggered an event. Meveto communicates with your application using the webhook URL of your app that's provided at the time of registration. For example when a user requests logout, Meveto will send a webhook call to your app and will provide a user_token in the payload of the call. Your app will need to exchange that user token
with Meveto, using this endpoint to get Meveto ID of the user.
User endpoint
https://prod.meveto.com/api/client/user-for-token
Expected payload
The endpoint is expecting a GET
HTTP request with token
as a query parameter set to the value of the user token your application received via a webhook call from Meveto. Additionally, the Accept header
also needs to be set to application/json
on the request.
Example
https://prod.meveto.com/api/client/user-for-token?token=token-content-you-received
Response of the endpoint
The endpoint will return a JSON
response with an HTTP status of 200. The response body will contain error
, error_description
, status
and payload
. If there is an error with the request, then the error key will indicate the type of the error that has occurred and error_description will provide a short description of the error. Descriptions of the status and payload keys are given below.
status
This will be a string value indicating whether the user's Meveto ID has been successfully retrieved or not. It will hold a value of Token_User_Retrieved
if the user token was valid, with a retrievable Meveto ID or Invalid_User_Token
if the provided user token is not valid.
payload
Payload will contain Meveto ID of the user. Inside the payload key, there will be a user
key that represents Meveto ID of the user.