Discussions
API request 403
Hey,
I tried to get the new API running. I used the example below which is the example from the documentation (https://developer.personio.de/reference/post_v1-recruiting-applications).
On this domain it works perfect, but when I run that code from my domain I get an 403. How is that possible? What am I doing wrong?
const options = {
method: 'POST',
headers: {
accept: 'application/json',
'X-Company-ID': 'XXXX',
'content-type': 'application/json',
authorization: 'Bearer XXXX'
},
body: JSON.stringify({
phase: {type: 'system', id: 'offer'},
first_name: 'First',
last_name: 'Name',
email: '[email protected]',
job_position_id: xxxx
})
};
fetch('https://api.personio.de/v1/recruiting/applications', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));