To view this content in our official product documentation, click here.
Introduction
Patchworks API requests must be authenticated with a bearer token. To obtain a token, you need to send a login request which includes credentials that you use to access the Patchworks dashboard.
The steps
Show me
Step 1\ Create a POST request for the following endpoint:
{% code lineNumbers="true" %}
https://svc-fabric.pwks.co/api/v1/loginThis endpoint is for the Patchworks **production** environment.
Step 2\ In the request body, add the email and password that you use to log into the Patchworks dashboard. You should add this as JSON - for example:
{% code lineNumbers="true" %}
{
"email": "joe.bloggs@wearepatchworks.com",
"password": "mypassword123*"
}
Step 3\ Send the request - if successful, a token is returned. For example:

Access tokens are valid for 24 hours - for example: \ Issued: Wednesday 20th July at 10:03:08 GMT \ Expires: Tuesday 21st July at 10:03:08 GMT
Step 4\ Save this token ready for use in your initialise request.
Comments
0 comments
Please sign in to leave a comment.