Patlatus
Patlatus

Reputation: 1661

What is the problem with Postman handling Authorization bearer token as a variable?

I am performing POST to https://{{datacloud-domain}}/api/v1/ingest/sources/{{connector}}/{{table}} but I receive 401 Unauthorized

I am using correct Bearer token authorization.

Using Data Cloud token (which starts with eyJraWQi...)

Looks like there is a problem with Postman handling Bearer Auth type when Data Cloud Access token is stored in a variable

401 Unauthorized

If raw value inserted, it works fine.

202 Accepted

Why postman cannot process correctly and pass bearer token?

Upvotes: 0

Views: 43

Answers (1)

Crelda
Crelda

Reputation: 1

I was experiencing a similar issue and discovered I had created an environment variable with the same name as my collection variable. The environment variable took precedent and overwrote the collection variable I was updating.

To check this, there is a UI element in the top right next to the environment dropdown. It shows all the variables being used in your request. Next to each variable is a character in a coloured box which indicates the source of the variable.

Once I deleted the environment variable my requests authorised correctly.

Upvotes: 0

Related Questions