Unable to Merge using API

Hi,
I’m trying to use the API in Gitlab to accept and Merge in a MR that I’ve created using the API.
Trying to test using Postman with post method, here is what I’m using with sudo token permission.
https://mywebsite.com/berserker-squad/525/merge_requests/39/merge

Then I get the following error.

		<div class="container">
			<h3>The change you requested was rejected.</h3>
			<hr />
			<p>Make sure you have access to the thing you tried to change.</p>
			<p>Please contact your GitLab administrator if you think this is a mistake.</p>
			<a href="javascript:history.back()" class="js-go-back go-back">Go back</a>
		</div>

I did some research online about other users coming across this when setting certain setting in setting/general/merge request, but didn’t have same setting as those users. Below is the settings using for this test project.

gitlab has a very flexible ACL system for many operations.
it is possible to be able to create a merge request from a branch, but not be able to write to the target branch, or MR must be approved. besides most of these permissions can be set at SERVER, group, project and repository level.

Specifically, I would take a look at repository merge request rules, or maybe look at “protected” branches, and make sure that user (and that token) has the right permissions to do merges.

as a rule of thumb, you should 1st validate the operation you want with the web interface.
Then, using the same user’s credentials, and making sure the personal access token has all the right things “checked”, do this with the API.