Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
      • Learn more about Agile
        • Agile Webspace
        • Everything Agile
          • The Agile Manifesto
          • Best Practices
          • Retro Recipes
        • Methodologies
          • The Scrum Framework
          • Kanban
          • Extreme Programming
        • Roles
          • The Product Owner
          • The Agile Coach
          • The Quality & UX Coach (QX)
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Pogram
    • DataMiner DevOps Support
    • Feature Suggestions
  • Swag Shop
  • Downloads
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Solutions
    • Deal Registration
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

Multi-threaded timer: how to poll an API and authenticate using bearer token ?

148 views5 days agoauthentication DataMiner cost dataminer express Multithreaded Timer
7
Stephen Goode [DevOps Advocate]138 23rd June 2025 0 Comments

hi all

i am trying to poll an api on a multi-threaded timer, looking at the documentation here i see how to authenticate using a username/password. for my use case i must authenticate using a bearer token, please see the below image for my QActionBefore code in which i construct the request

i'm expecting to receive a response with a json body, instead i receive html for a login page - it seems authentication has failed. i tried adding the access token in the request headers but no luck

how can i authenticate properly using a bearer token rather than username/password while using a multi-threaded timer ?

many thanks all

Bram Devlaminck [SLC] [DevOps Enabler] Answered question 5 days ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Bram Devlaminck [SLC] [DevOps Enabler]395 Posted 5 days ago 0 Comments

Hi Stephen,

I tried to locally reproduce your issue and DataMiner seems to send the header as expected, so it should not be an issue for DataMiner to authenticate with the bearer token header.
I suggest you log the contents of the `requestSettings` object, to see what the actual contents of the bearer token are.

You could do this in the following way:
```
protocol.Log(protocol, \"QActionBefore Request data: new object[3] { \\\"http\\\" , new string[6] { \" + String.Join(\",\", requestSettings) + \" } };\");
```
The output of this should be visible in the element logging file.
This file can be found in `C:\\Skyline DataMiner\\Logging` and has the following name: <YourElementName>.txt.

You can then verify if the bearer token works as expected by using it in curl, Postman,...

Alternatively, you could take a completely different approach by not using a multithreaded timer, but by spinning up multiple threads in the QAction itself.
Instead of using the DataMiner `requestSettings` object, you would then be able to use a .NET Framework HTTP library, such as .NET HTTPClient to perform the HTTP calls.
This way, all the HTTP logic is handled by that library, and not by DataMiner itself.

Hope this helps.

Kind regards,

Bram Devlaminck [SLC] [DevOps Enabler] Answered question 5 days ago
You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin