how to use encode base64 with jira cloud api via postmann

Bruno Bernadet February 16, 2022

i seek on the community group and i find that some errors could occur because of the authentification. i try to fix it on postmann but i dont find the correct way. i use api token and i see that a lot of users use mail: api encoded on base64 on the header . i a  a noob with postman so i dont see how in the api how to settle this 

so -what i have to choose in authorization : Api key or bearer token?

- have i to modify the body of the pre request script ?

 

pm.sendRequest({
    //url: pm.environment.get("api-url") + 'v2/authenticate',
    method: 'POST',
    header: {
        'content-type''application/json',
        client_id: pm.environment.get("client_id"),
        client_secret: pm.environment.get("client_secret"
    },
    body: {
        mode: 'raw',
        raw: JSON.stringify({ client_id: pm.environment.get("client_id"), client_secret: pm.environment.get("client_secret") })
    }
}, function (errres) {
    pm.environment.set("AUTH_TOKEN"res.json());
});
I have a 200 response while using authentificate but for a get project id i have 
   "error""Failed to parse Connect Session Auth Token"


0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events