VP CALLBACK LOGIN: Difference between revisions
Jump to navigation
Jump to search
Starting to work on callback page |
m Removed reason codes that aren't passed to callback |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{sdk callback page|login | {{sdk callback page|login | ||
| | |reasoncodes= | ||
{{sdk return code row|string_too_long |If any of the given string parameters exceed 255 bytes in length (when using UTF-8 encoded characters they can each be multiple bytes long)}} | {{sdk return code row|string_too_long |If any of the given string parameters exceed 255 bytes in length (when using UTF-8 encoded characters they can each be multiple bytes long)}} | ||
{{sdk return code row|invalid_login |The login credentials are incorrect}} | {{sdk return code row|invalid_login |The login credentials are incorrect}} | ||
|returnattributes= | |returnattributes= | ||
{{sdk attribute row|int|my_user_id|User id of account used to log in}} | {{sdk attribute row|int|my_user_id|User id of account used to log in}} | ||
|examples= | |examples= | ||
|seealso= | |seealso= | ||
}} | }} |
Latest revision as of 21:17, 30 July 2018
Callback set and handler snippet
vp_callback_set(instance, VP_CALLBACK_LOGIN, callback_login);
void callback_login(VPInstance instance, int reason_code, int reference) { }
Sent to the client in response to vp_login()
Reason code
This callback is passed a return code integer, which indicates whether the request was successful (0
) or errored for any of these reasons:
Return code | Cause |
---|---|
VP_RC_SUCCESS |
Successful call (for methods that have a registered callback, it only means the request has been sent) |
VP_RC_STRING_TOO_LONG |
If any of the given string parameters exceed 255 bytes in length (when using UTF-8 encoded characters they can each be multiple bytes long) |
VP_RC_INVALID_LOGIN |
The login credentials are incorrect |
Return attributes
Attribute | Usage | |
---|---|---|
VP_MY_USER_ID | User id of account used to log in |
Behavior
- There is no special behavior for this callback
Examples
- This callback has no usage examples; please add at least one to this page