API Fundamentals

View as MarkdownOpen in Claude

Authentication & Token Management

Creating an API Token

To create an API token, head over to the API Tokens page in your toolbar, then click Create API Token. Give your token a name, and once you’ve done that, you’ll see a button to copy it.

Deleting an API Token

To delete an API token, you’ll need to head over to the API Tokens page in your toolbar, find the token you wish to delete, and click Delete.

You’ll be asked to enter the name of the token in order to delete it.

Please be aware that once a token is deleted, you will be unable to perform any more actions with it and it cannot be recovered.

Token Best Practices

  • The Prolific API tokens have no expiry date and are best used for server-to-server communication only. We advise rotating API tokens as required.
  • The Prolific API tokens are scoped to the Researcher account - anything your researcher account can access, your API token can also access.
  • We recommend you do not integrate with the Prolific API directly from your web application. This would expose your tokens publicly.

Using Your Token

When making a call to Prolific’s API, add an Authorization header with the value Token <your token>.

GET
https://api.prolific.com/api/v1/users/me/

Error codes

The Prolific API may return the following error codes.

CodeDescription
400Bad Request - The request was unacceptable. Check the response for more details.
401Unauthorized - No valid token was provided.
404Not Found - The resource does not exist.
405Method Not Allowed - You tried to access a resource with an invalid method.
422Un-processable entity - A validation error on a well-formed request. Check the response for more details.
429Too many requests - You have sent too many requests (either in general, for a resource or for a related resource) in a given amount of time. Click here for more information on handling 429s from Prolific.

Note: You may also get a 401 or 404 error if you do not have access to the requested resource.

If the error is unclear or none of the above applies, please submit a request to our support team.

API Status

Prolific’s status page can be found here. You can also subscribe to updates.