account_decrypt_shared_key (shared_key, language )
Decrypts a shared key and returns information about the channel by which it was sent | |
Input parameters: |
|
Output parameters: |
|
Request sample: | account_decrypt_shared_key ( “78csahi7chqw7r”, "ES"); |
Response sample: | <?xml version="1.0" encoding="utf-8" standalone="yes"?> <result> <sharedkey> <type>1</type> <locale>es<locale> <channel>mymail@company.com</channel> <channeltype>EMAIL</channeltype> </sharedkey> </result> <ErrorMsg></ErrorMsg> <ErrorCode></ErrorCode> |
Notes: |
Return Error codes
ERROR CODE | |
---|---|
SHAREDKEY.INVALID | The shared key indicated is not valid |
ACCOUNT.ACTIVATION_PENDING | Returned when the shared key is an ASSOCIATE INVITATION and the account is pending to be activated (using account_activate() ) |
ACCOUNT.ALREADY_ACTIVE | Returned when the shared key is an ACCOUNT VERIFICATION and the account is already active |
PROGRAM.NOT_FOUND | Returned when the shared key is a PROGRAM INVITATION but the information contained in the shared key does not correspond to an existing PROGRAM |
Types of Shared Keys
Type | Description | Example of XML returned | |
---|---|---|---|
1 | ASSOCIATE_INVITATION | Generated when a CASE sends an invitation to an ASSOCIATE using the function case_insert_associate() | <sharedkey> <type>3</type> <locale>es<locale> <channel>mymail@company.com</channel> <channeltype>EMAIL</channeltype> </sharedkey> |
2 | PROGRAM_INVITATION | An invitation to a PROGRAM. This type of invitation allows a new User to create a SUBSCRIPTION to a PROGRAM. Generated by program_get_invitation() | <sharedkey> <lang>es</lang> <type>2</type> <name>Detección de los genes BRCA</name> <description>BRCA de detección desarrollado para PRECEDI</description> </sharedkey> |
3 | ACCOUNT_VERIFICATION | Generated when a new USER is registered in Linkcare WS and need to be activated. This shared key can be generated by | <sharedkey> <type>3</type> <locale>es<locale> <channel>mymail@company.com</channel> <channeltype>EMAIL</channeltype> </sharedkey> |