Quickstart
Build hyper-personalized experiences for your users
In this Quickstart, you will create your own Digital Self by connecting your Google activity. You can then ask specific questions to your Digital Self.
This is what hyper-personalization feels like.
Create a developer profile
First of all, create a developer profile. This is where you will be able to see all the users that log in via Fabric. You can get an overview from the main page:
Create an API Key by clicking on Keys -> Create API Key:
Make sure to copy the API key as it will not be shown again. You can always create a second one.
Onboard your first user
You are now ready to onboard your first user (yourself). Ready to create your Digital Self?
First, generate a user token for your first user by calling the Generate Token API.
Make sure to set api-key
as the API key you obtained in the previous step and uid
with a unique identifier of the user you are about to onboard.
The API returns a token
in the response body. This is the unique token that identifies the onboarded user.
You are now ready to connect your Google activity via Fabric! Go to https://www.onfabric.io/consent/fabric/google?token=
and append the token you just obtained.
You will be shown a consent flow to grant access to a hypothetical fashion retailer named “LOGO”:
This consent flow can be completely personalized to your use case.
In just a few clicks, you can grant Fabric access to your Google activity. Make sure to share both the “Search” and “Shopping” scopes. The more Fabric learns from you, the better your online experiences.
That’s it! Fabric is now creating the Digital Self of the user you just onboarded.
After a few minutes you should see a user named test-uid
(unless you provided a different UID) in the Users section of your developer dashboard:
Ask your user
You can now ask specific question to the Digital Self of the user you just onboarded via the Ask User API.
Make sure to set api-key
to your API key, uid
to the unique identifier of the user and q
to a question you want to ask the user’s Digital Self. Be creative in your questions, but remember that Fabric can only answer questions based on the Google activity provided by the user.
For more insightful answers and even more personalized experiences, the user can also grant Fabric access to their activity on Instagram, Facebook, TikTok, Pinterest, and much more.
The answer to the question is found in the answer
of the response body.