-
Notifications
You must be signed in to change notification settings - Fork 133
Closed
Labels
enhancementNew feature or requestNew feature or request

Description
Summary
Can amplitude SDK support custom request headers? Like
amplitude.getInstance().init(APIKEY, null, {
headers: { // <- new attribute in option
'x-session-id': appToken
}
});
// or
amplitude.getInstance().init(APIKEY, null, {
headers: function() { // <- new attribute in option
return {
'x-session-id': appToken
};
}
});
Motivations
Our frontend events require to flow into our backend and then to amplitude (frontend -> backend -> amplitude). We are doing so because we want to massage (by adding user information based on the x-session-id
) the frontend events a little and then use a centralized forwarder to send events to amplitude.
We still want to keep using the amplitude frontend SDK to collect the metadata information (like device ID) and queue feature. But need a way to pass our backend the auth token.
Is this possible or is there any workaround? Thanks.
kimhecan, sethbro and seanf
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request