Search code examples
githubtokenmicrostrategy

How do I grab raw GitHub content from MicroStrategy if the token changes every time it's edited?


So I have a link that I use in MicroStrategy to grab GitHub content https://raw.githubusercontent.com/some_company/some_name/master/some.csv?token=AROBLXVAT3OVYNWAQZGBINDBGJB5S

And the file is changed about every week, and it seems like the token doesn't stay constant, so my connection to the file breaks. Is there a way to get a constant token that MSTR can have so the link between Microstrategy and GitHub remains constant?


Solution

  • Raw links to private repositories on GitHub use an expiring token that contains a timestamp and is restricted to a particular revision. It's intended that this token works this way to prevent persistent compromise in case of leakage, and there's no way to make it persist forever.

    If you need to continue to access this file on a periodic basis, you should use the API periodically to get an appropriate link or retrieve the contents via the Contents API and then upload those to MicroStrategy.