To communicate with the Parakey API you need to supply an Access-Token. These tokens are unique to a user and should be stored securely. Access tokens should only be used server-side and not to be shared in client applications.
Requesting an access-token for development
In order to create your access token, you need to be an "API Administrator" and have access to My Parakey. The access token will be connected to your account, please be aware that this also means that your name and email will be used in administrator logs. This makes sure you can easily get started using your own personal access token.
- Log in with your Parakey account at https://my.parakey.co
- Make sure you have been assigned API Administrator privileges to at least one domain. This can only be performed by an Administrator for a specific domain.
- Navigate to the Developer page in the top right corner of the top menu.
- Click on "Create new access token"
- Give it a good name and press "Create access token"
- The newly created access token will be displayed in the popup window. After closing the popup window you will no longer be able to access it again so make sure to copy it to a safe location.
If you access token is lost, navigate to the Developer page and redo the steps above. You should remove old access token to minimize the risk of someone else gaining access.
Performing a request using your Access-Token
Simply add the access token to the header for all your requests.
Moving to a production-ready integration
If you are developing a public integration that are going to be used by other customers in Parakey you need to create a separate account for your integration before you go live. This account should not be connected to any individual, instead, we recommend using a generic email (for example email@example.com or firstname.lastname@example.org)
- First, you can create this "integration account" yourself by sign in to Parakey and your Demo place
- Go to Users and click "Invite new users", enter the email address for your "integration account", then give this user the "API Administrator" role on your Demo place.
- You will then get an invitation email to this "integration account"
- Sign in to Parakey with the email and one-time password you receive in the invitation.
- Set a name that represents your integration, for example, first name = "Parakey" last name "booking system", this is the name that will be displayed in the admin log when your integration performs any action.
- Set a strong password and accept the terms of service
- Create a new Access Token on this user, you only need one Access Token for all customers using the "integration account".
- Ask your customer to invite the email address of your invitation account and give the user the role "API Integrator"
- You are now good to go!