If your Surveypal organization is created before 31.08.2022 then you can use also API key for authentication.
Basic authentication is combination of your email address (Surveypal user name) and API key. Combination need to be a Base64 encoded string.
Authorization header format:
Authorization: Basic <email_address/token-api_key>
Basic authentication user name
This is your Surveypal user name, for example email@example.com
Basic authentication password
- Select your name from the bottom left corner on the Surveypal front page
- Select 'Your account'.
- Select tab 'API keys'
- Create your first token by clicking 'Create key'
- Give your API key a name and click 'Create'
- Combine text "token-" and your API key
For example if API key is "AA_HvXX0A1Y1X11113ZV3v11cXX" then Basic Auth password is
Encode user name and password
You have to encode your user name and password to Base64 format.
Take your user name and password and combine these like this:
and encode this with Base64. You can use text editor like Notepad++ or some service like https://www.base64encode.org/
Above username and password Base64 encoded:
Add authorization header to your request
Now when you have encoded Basic Auth key, just add it to your request header like this
Authorization: Basic dGVzdC5hY2NvdW50QHN1cnZleXBhbC5jb206dG9rZW4tQUFfSHZYWDBBMVkxWDExMTEzWlYzdjExY1hY