Implement a SharinPix Token Decoder in Salesforce (Developer-Oriented)
Apex Method
public static Map<String, Object> decode(string token){
string payload = token.split('\\.')[1];
payload = payload.replace('-', '+');
payload = payload.replace('_', '/');
string jsonPayload = EncodingUtil.base64decode(payload).toString();
Map<String, Object> decodeTokenObject = (Map<String, Object>) JSON.deserializeUntyped(jsonPayload);
return decodeTokenObject;
}Example: Using a Salesforce Flow to decode a token and save it in a field
Creating the Invocable Class
Creating the Salesforce Flow





Demo

PreviousSharinPix Mobile App: Retrieve User Information When Uploading Photos (Developer-Oriented)NextGenerate token from SharinPix Permission with Apex
Last updated
Was this helpful?

