# API REQUEST Cod 900901

**URL:** <https://forum.uipath.com/t/api-request-cod-900901/407253>\
**Category:** Activities\
**Tags:** question, webapi, activities\
**Created:** [March 15, 2022, 8:18pm UTC](https://forum.uipath.com/t/api-request-cod-900901/407253 "2022-03-15T20:18:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![karina\_mota](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/karina_mota/32/292888_2.png) [@karina\_mota](https://forum.uipath.com/u/karina_mota)\
**Post date:** [March 15, 2022, 8:18pm UTC](https://forum.uipath.com/t/api-request-cod-900901/407253/1 "2022-03-15T20:18:34Z")

</div>

Hello,

I really need your help. I’m having trouble getting an API. I made the post to request the Token and so far so good. I entered the bearer token as a variable, bearer acess\_token (access\_token is requested in the output if I leave only the bearer). I did all the settings, but it still accuses me of the error

{“fault”:{“code”:900901,“message”:“Invalid Credentials”,“description”:“Access failure for API: /consulta-cnpj-df/v2, version: v2 status: (900901) - Invalid Credentials. Make sure you have given the correct access token”}}

I don’t know what the error is, because in postman the request is made normally. Please can someone point me to a solution?

I’m studying, but I still don’t have much knowledge in API

 ![Capturar0](https://global.discourse-cdn.com/uipath/original/4X/5/4/2/5424e18bc2f76cd4af24ebe2a510e10b5894d5a6.jpeg)

post

 ![Capturar1](https://global.discourse-cdn.com/uipath/original/4X/6/0/7/6074e91949b7d7a00a5de02d718e96c7999f3111.jpeg)  
 ![Capturar2](https://global.discourse-cdn.com/uipath/original/4X/2/b/2/2b2d344d6c9c3bfae607454e941dfa14e26334f3.jpeg)  
 ![Capturar3](https://global.discourse-cdn.com/uipath/original/4X/7/b/1/7b1c601fb9122db71fa1392304e0df58fe384a28.jpeg)

get

 ![Capturarget](https://global.discourse-cdn.com/uipath/original/4X/f/b/f/fbf6833c7bf9df9629889a42cff32ffd270424af.jpeg)  
 ![Capturarget](https://global.discourse-cdn.com/uipath/original/4X/f/b/f/fbf6833c7bf9df9629889a42cff32ffd270424af.jpeg)  
 ![Captur11ar](https://global.discourse-cdn.com/uipath/original/4X/5/b/2/5b2d459c758d542484ea5861556e3780e5df5342.jpeg)

 ![Capturargt3](https://global.discourse-cdn.com/uipath/original/4X/3/d/3/3d35e30e612282410fb7d5e8dd403f84d2b6f5b6.jpeg)

 ![dd](https://global.discourse-cdn.com/uipath/original/4X/9/6/3/9638d7f50b3439ad24a25574c99e89e9d52d71c1.jpeg)

---

<div class="post-metadata">

**Author:** ![lepumin](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lepumin/32/179880_2.png) [@lepumin](https://forum.uipath.com/u/lepumin)\
**Post date:** [March 15, 2022, 11:56pm UTC](https://forum.uipath.com/t/api-request-cod-900901/407253/2 "2022-03-15T23:56:22Z")

</div>

Check the Bearer Token authentication syntax

```auto
Authorization: Bearer {token}

```

Remove “ACCESS\_TOKEN” and put one space before to concatenate the token

---

<div class="post-metadata">

**Author:** ![karina\_mota](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/karina_mota/32/292888_2.png) [@karina\_mota](https://forum.uipath.com/u/karina_mota)\
**Post date:** [March 16, 2022, 1:05pm UTC](https://forum.uipath.com/t/api-request-cod-900901/407253/3 "2022-03-16T13:05:28Z")

</div>

Hi @lepumina

I had already tried to do that, but it didn’t work. I think it was the space lol. Thanks  
😀

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [March 19, 2022, 1:06pm UTC](https://forum.uipath.com/t/api-request-cod-900901/407253/4 "2022-03-19T13:06:12Z")

</div>

Closed on March 19, 2022, 1:06pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
