https://api.adapty.io/api/v1/sdk/profiles POST create User not working(404 not found)
complete
K
Khoren Minasyan
import fetch from 'isomorphic-fetch';
const headers = {
'Accept': '/',
'Content-Type': 'application/json',
'Authorization': 'Api-Key secret_live_nwVOyxh4.PguuHThYGgIrpaoJkZnCM1YODsXDKnUh'
};
export default {
createUser: async (userId) => {
try {
const response = await fetch(${process.env.ADAPRY_API_URL}/profiles, {
method: 'POST',
headers,
body: JSON.stringify({customer_user_id: userId})
});
if (response.status !== 200) {
return [adapty api create user error, status: ${response.status}, null];
}
const result = await response.json();
console.log('result: ', result);
return [null, result];
} catch (e) {
return [
createUser: ${e.message}
, null];}
} ....
Hi, here is code writen in node js, and getting 404 error
Adapty Support
complete
A
Adapty Support
Hi there! Please kindly check if you are missing "/" (slash) at the end of your request.
Thanks !