To securely interact with Privicore, each request requires an authorization header. This header contains an authorization token that is retrieved by authenticating the application profile. Follow the steps below to authenticate your profile and obtain the token.
Example using cURL
Step 1: Attempt Authentication #
Start by attempting to authenticate using this command:
curl -X POST https://privicore.address/profile/attempt-authentication \
-F 'username=youruser@example.com' \
-F 'password=YourSecurePassword'
This command returns an action ID in the following format:
[
"01927ba1-3e7-91da-e614-25f7be07889a"
]
Step 2: Retrieve Temporary Token #
Next, use the action ID from the previous step to obtain a temporary token:
curl -X POST https://privicore.address/profile/retrieve-temp-token \
-F 'id=01927ba1-3e7-91da-e614-25f7be07889a'
The response will include a temporary token:
{
"token": "temporary-token-value"
}
Step 3: Request Authorization Token #
Now, request an authorization token by providing the necessary scopes and the temporary token:
curl -X POST https://privicore.address/profile/request-authorization-token \
-H 'X-DPT-AUTHORIZATION: temporary-token-value' \
-F 'scope[]=all'
Step 4: Retrieve Full Authorization Token #
Finally, use the temporary token to retrieve the full authorization token for future requests:
curl -X POST https://privicore.address/profile/retrieve-authorization-token \
-H 'X-DPT-AUTHORIZATION: temporary-token-value' \
-F 'request_auth_token_command_id=01927ba1-3e7-91da-e614-25f7be07889a'
The response will include the full authorization token, which should be used in the X-DPT-AUTHORIZATION
the header for all subsequent requests to ensure secure access.