ACC General Discussion Forum
Share your knowledge, ask questions and explore popular discussions about everything ACC
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to get API Token

0 REPLIES 0
Reply
Message 1 of 1
gblanksV8X2H
83 Views, 0 Replies

Unable to get API Token

Hello, I'm currently trying to get the API token, both for the 2 legged and 3 legged, and i seem to be unable to get it and I have a feeling its due to a slight problem with my syntax. Each time I do a post request trying to get this data I get a 404 and any changes don't change it from just returning a 404, so I'm having a bit of difficulty figuring out exactly where my problem is. I'm guessing its the way I concat my ID and Secret. So I'm using python for this and the code for getting the authorization token is this

Client_ID = b'<Client_ID>'
Client_Secret = b'<Client_Secret>'
base64.b64encode(Client_ID+Client_Secret)

and I seem to get the right value from this based on the == at the end of it, similar to how it shows in the documentation. I then pass it into the headers as 'Authorization': 'Basic <Token>' where token is the output from the b64encode function, copied and pasted into the string. I feel that the way I'm moving the output of b64encode into this is the incorrect thing, but I'm not entirely sure. Any ideas? 

Labels (1)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

 

View short, easy-to-follow videos about how to use Autodesk's construction products.


 

Autodesk Design & Make Report