server-side API. Grant subscription and create user profile
complete
K
Kevin Amiranoff
We are setting up our payment system on our website and I have a question about the API.
Do I need to create a user profile in Adapty before granting the subscription?
Does the user need to exist before calling this endpoint?: https://docs.adapty.io/docs/server-side-api-specs#prolonggrant-a-subscription-for-a-user
Do I need to check if the user already exists in Adapty, then call this endpoint https://docs.adapty.io/docs/server-side-api-specs#create-a-user, then update the subscription?
Adapty Support
complete
a
adapty access
Hi there! Thank you for reaching out.
Yes, your users should exist in our database before you grant them an access level (their profile_id should be present in the request).
This request creates a new profile in our database, so there is no need to check if this user exist in our database. Once you create a profile, you can grant them an access level, as mentioned in the point 1.
Hope that helps!